- Home /
shutter when moving and rotating
I am planning space game with true space movement with inertia and such (no slowing when 0 thrust)
I have rigidbody with physic and zero gravity. I calculate thrust in all axis and then apply it with
rigidbody.AddRelativeForce(new Vector3(horizontal, vertical, thrust));
I also look for player mouse and calculate wanted rotation, then apply it with
transform.Rotate(new Vector3(-acttualRotation.y*rotatePower,
acttualRotation.x*rotatePower, acttualRotation.z * rotatePower) * Time.deltaTime);
The thing is that when I move and rotate at the same time I can see shuttering of ground and other rigidbodies too.
You can see it yourself at http://maxikgames.netau.net/space_for_answers.html
Controls
Use ADYX to translate Left Right Up Down ,Q E to rotate, W S to change desired speed, hold space to nullify all transvelocity and set forward velocity to desired speed, mouse to look and rotate.
How to reproduce:
Set desired speed to like 50, hold space and turn your mouse slightly to left or right.
When you start, on your left is static cube. You can fly near it while rotating yourself to see it, you will see it shutters same as ground
Edit: No reason for this to be a community question
I can't run the game as I am at work. How is your camera setup?
The question is how to avoid jerking? Camera is Default main camera, bound to rigidbody cube.
You may want to add some scripting to your camera. The idea is that whenever an object rotates 1 degree, any objects attached but further away must move to be in the same position. The result is that for even small amounts of rotation, attached objects have to move a good distance. this can cause jitter and shaking. This is increased if the object moves back and forth tiny amounts. Does that sound accurate of your situation?
Your answer
Follow this Question
Related Questions
rotation in a clockwise manner 0 Answers
How to rotate a tank turret and gun? 2 Answers
Convert WASD to local rotation 1 Answer
gameobject stops moving correctly when rotating 1 Answer
How to smoothly move and rotate my object to a target? 1 Answer