Saturday, September 8, 2018

unity - How to keep a GameObject from dropping?


I am applying the following script to first person object:


function Update () {
var mountain : GameObject;


mountain = GameObject.Find("QuantumCold_B");
transform.RotateAround(mountain.transform.position, Vector3.up,20 * Time.deltaTime);
}

When I run this it looks like the mountain is turning and the first person object is falling. I applied this script to the first person object thinking it would rotate around the mountain. Perhaps I need to apply lookAt in some way? How do I keep the first person object form falling?


I did set the gravity=0 for motor section of Character Motor Script.




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...