- Home /
The question is answered, right answer was accepted
Move the object down while it rotates
So im trying to rotate the object and then move it down while it rotates.But for some reason it does not want to move down like i want it too.
{ rigidbody.velocity = new Vector3(0,-10,0); localTrans.RotateAround ( Vector3.zero,rotation_axis, 100 * Time.deltaTime); localTrans.rotation = Quaternion.identity; } Help me please.Thank you.void FixedUpdate()
Answer by wibble82 · Feb 12, 2014 at 10:23 AM
If you remove the rotation bits does it fall correctly?
It could be that you need to use rigidbody.MoveRotation or rigidbody.ApplyTorque to make the physics rotate the object. Directly setting the transform may be causing problems, but I couldn't say without testing it.
yes if i remove the Rotate Around the object goes down exactly like i wanted.
what if you just set the rigid body's angular velocity as well, so its falling and spinning?
I tryed AddForce,AddTorque and even $$anonymous$$ove Rotation. None worked.
Thank you for your help i figured it out by myself.The problem was with RotateAround that asks as a first parameter a fixed point so i just made a new one that increases on axis and it worked.
Follow this Question
Related Questions
Rotating Player 0 Answers
How do I translate my ship left and right and have it rotate at the same time? 1 Answer
Move Player without acceleration 1 Answer
How to let a GameObject move? 2 Answers
Move forward to the endposition 0 Answers