- Home /
Translate speed keeps changing
transform.Translate((Time.deltaTime*3),0,0);
thats the above code I'm using to move my Object, I also have code that changes the objects rotation. The more my object differs from its original rotation the slower it translates. How do I fix this?
Any chance your object is a child of a non-uniformly scaled game object?
No, and it still happens when its not a child, if it changes anything I am using Quaternion.Euler to change my angles.
Do you have any other scripts on this object?
As an experiment, place this script on a cube in a new scene. Use the arrow keys to turn. Do you see any slowdown?
#pragma strict
function Update () {
transform.Translate((Time.deltaTime*3),0,0);
transform.Rotate(0.0, 0.0, Input.GetAxis("Vertical") * Time.deltaTime * 90.0);
}
yes there is a slowdown when I rotate, I have the camera with just a transform.translate. The more I change the angle the more it goes behind the camera.
Answer by SavvaMadar · Feb 25, 2014 at 05:53 AM
fixed by giving the translate property to parent
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Rotating an object 3 Answers
Camera to follow the player in the form of radius 1 Answer
Can I limit the rotation of an Object on an axis between a Negative and Positive value? 2 Answers
Drag Rotation Objet Snapping to 0,0,0 on new drag. 0 Answers