A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate in the Unity community.
Separate names with a comma.
The hit gameobject doesn't have a "Base" component. Why not just compare hit.gameObject == homeBase?
private var anim : Animation; function Start() { anim = transform.root.GetComponentInChildren( Animation ); } function OnCollisionEnter(...
Search for UV animation on the wiki or here on the forum you might be able to find a direct link to it. Essentially you use a custom script to...
Make only the parent object a rigidbody; remove the rigidbody component from the two objects. A rigidbody is composed of all the colliders on...
function HasParentOfTag( tag : String ) : boolean { var check : Transform = transform.parent; while ( check ) { if ( check.CompareTag(...
Try explicitly casting to Car - steer = ((Car)GameObject.FindWithTag("Car").GetComponent.<Car>()).Steer; Or, better, - Car car =...
function OnTriggerEnter( other : Collider ) { MoveObject( other.transform, Vector3.up, 5.0 ); } function MoveObject( object : Transform,...
I had a similar issue once where Unity's time scale was actually set to start at zero when I crashed it in-game in a timescale-changing function....
I just c/p'd this into a new Unity scene, put three identical trigger zones in front of the camera, and dropped a cube with this attached into the...
A good place to search for premade scripts is the Unity wiki, but the basic implementation of "follow player" is incredibly trivial and it's...
Why not this? - var triggered : boolean = false; function OnTriggerEnter( other : Collider ) { if ( !triggered ) { triggered = true;...
Choose a start and end point and create a randomly-twisted path between them. Then, for each point on that path, randomly decide whether to...
Don't forget to breathe once in a while, friend. Yes. Just restrict player movement, either through physics collisions or by using a grid to...
'Course it is. var animations : String[]; function PlayAnimationsInOrder() { for ( var s in animations ) { animation.PlayQueued( s ); }...
If the ray you're casting hits nothing, use some distance from the camera as the aim point - eg var aimDistance : float = 10.0; var rch :...
You have to access an array by index if you want just one element activeObjects[x].active Or you can iterate through all of them with for ( var...
That's how you do it. What's the problem? public class x : y { GameObject player; void Start() { player = GameObject.Find("SomeGuy");...
Find the player by name or tag in the Start function, is the easiest way. GameObject.FindObjectWithTag( "Player" )
Just make the sun a child of a pivot object, and rotate the pivot. (transform.Rotate)
Here's a topic on this exact issue: This topic