Transparent Terrain
Hi, Is there anybody who knows how to create a transparent terrain which can show the shadows? I could generate a transparent terrain using the shader in Wiki but it not receive the shadows! Thank you...
View ArticleRotate unit while taking terrain into consideration
I have vehicles in my game that need to have their y rotation value adjust based on the terrain underneath them. When driving uphill, my units y rotation will be incorrect. This is what I currently use...
View ArticleTime.Deltatime causing jerky movement
Hello folks, I am using unit.transform.Translate(Vector3.forward * Time.deltaTime * velocity); to move my unit across the battlefield. However, when playing on the fantastic setting the FPS is capped...
View ArticleUnity unit scale compared to Maya
Hey, I'm really struggling to understand what causes this issue and how to prevent it, or at least to understand Unity units properly if I'm just not understanding how they work. I've read that...
View ArticleAdding to a public list from a script on another object.
I'm trying to add to a public list from a script on another object. Eventually I want to have spawned units to be entered into a list so I can store which units are spawned in what order. This seems...
View ArticleHow to scale cube in IDE in one direction
Hi! I would like to scale cubes in Scene View (Unity IDE) in one direction. Just like it is for colliders with shift + ctrl. I can't achieve it for a mesh of cube. Any help? I'm used to scale object in...
View ArticleHow to select a unit in my RTS game?
I am making a RTS prototype just for practice and I am having trouble selecting a unit. I am only able to select a unit if the rectangle made by the GUI.Box goes over the center of the cube. I would...
View Article[Bug?] How do I draw textures less than 100px with Graphics.DrawTexture?
I'm working on a 2D tile-based game in Unity 4.3, but I'm struggling to render some basic tiles using Graphics.DrawTexture()... My texture is a 70x70px texture (I had a spritesheet, but that was...
View Articlepixel in unit in unity3d and have a full screen texture
this was my code after a long research ,,,,but unity released a new version...! var NewObjectWidth : float ; var OldObjectWidth : float ; var NewObjectHeight : float ; var OldObjectHeight : float ;...
View ArticleHow to get angle from unit to mouse click?
Hi, I can't figure out how to get an angle between unit and mouse click. I need it in C#. Angle from charactercontroller which is casting the spell to point where i clicked while ago by mouse. ![alt...
View ArticleIs there a way to ensure Awake is called in Unit tests?
I have been using the [Unity Test Tools][1] but I am having an issue where I am creating a gameObject in the test script, attaching a component that I want to test, but Awake is not being called. Is...
View ArticleUnity vs Unity with PlayMaker vs Unity with javascript
What are the capabilities of each formula ? what is the maxim i can get with each one ? let's say i want to create a game like Angry Birds will i need to do some scripting of my own ? But what if it's...
View ArticleHow should I rotate a 2D unit vector by X degrees?
As the title says, I have a 2D unit vector, and I simply need to rotate it by X degrees. I've done a lot of googling, and couldn't really find what I needed (most similar problems I found were quite a...
View ArticleComponent based architecture Unit, AI, Health, Attack
I've read several articles about component-based programming. It's very difficult for me to make such an component-based architecture, because i'm coming from the OOP site. What i want to achieve: A...
View ArticleUnity scaling
Hi, I'm basically trying to understand more how unity scaling and pixel per unit system works. I'd like to understand why to have pixel perfect positioning (so that a single sprite represents an object...
View ArticleBlocks generating on each unit intersection?
Heres a picture and below is the code I added. ![alt text][1] [1]: /storage/temp/35049-screenshot+(75).png using UnityEngine; using System.Collections; public class Levels : MonoBehaviour { private int...
View ArticleHow to change pixels per unit for Physics2D and Unity?
Where can I find the settings for changing how many pixels a unit takes for the 2D part of Unity? I can't find it anywhere, but I read about it all the time.
View ArticleUnit Selector
I't trying to make it, so when the player clicks on a unit it will select it, and draw a box around the edge on it. I've been looking at other questions but I couldn't get a good answer. Also the unit...
View ArticleWhat's good unit scale to use for RTS game?
Hello all, quick and easy question, no code involved, eh :) What is the best unit scale to use for RTS game or in other words what dimension of terrain would reassemble the maps from popular games -...
View ArticleA bunch of units, how to handle raycasting?
Okay, so imagine the following scenario -> I have 10 tanks on the grounds, the same type units. My first idea was to add a script to that tank type prefab, which waits and reacts when user clicks on...
View Article