Hi,
I’m trying to move a Sphere “down”, i.e. negative in the y-axis, but it goes positive in the z-axis.
I did not change any rotation, and I tried both Space.Self and Space.World.
I also searched for this is here and Google, none of the answers helped me, and I am always having this confusion, so please end this here
My function is a very basic function like this: (JavaScript)
function Update()
{
//I tried all of these lines SEPERATELY:
transform.Translate(transform.up*Time.deltaTime);
transform.Translate(transform.right*Time.deltaTime);
transform.Translate(Time.deltaTime*transform.forward);
transform.Translate(new Vector3(0,-Time.deltaTime,0));
transform.Translate(new Vector3(-Time.deltaTime,0,0));
transform.Translate(new Vector3(0,-Time.deltaTime,0),Space.Self);
transform.Translate(new Vector3(0,-Time.deltaTime,0),Space.World);
}
All of these lines cause the sphere move in the positive z-direction.
Any ideas why? and how do I solve this problem?
Thanks in advance.