Answer by Duugu
Using a lot of comparisons with tags imho is actually pretty slow, as string comparisons are slow at all. :)
View ArticleAnswer by Duugu
transform.position = new Vector3 (pos.position.x, pos.position.y - 1.9f, transform.position.z); This line moves your secondary object instantly to the position of you primary object. Have a look at...
View ArticleAnswer by Duugu
You're probably mixing up things. The speed variable itself is *private*. You can't access it. private float speed = 5f; The person who wrote this script was providing a *public* function to modify the...
View ArticleAnswer by Duugu
Ehm. That's because Update () ist called on every frame? :) See http://docs.unity3d.com/Manual/ExecutionOrder.html
View ArticleAnswer by Duugu
You're probably using a wrong combination of static colliders/rigidbodies/events. Please check the table at the bottom of [this][1] article to see if your setup is valid. If your setup is valid you...
View ArticleAnswer by Duugu
I would add a flag isRotating and set it to false as default. Then I would set the flag to true in OnMouseDown and check if transform.rotation is equal to targetRotation in Update if the flag is true....
View Article
More Pages to Explore .....