- Home /
Rigidbody projectile jittering
Hello everybody! Im aware similar questions were asked already, but they dont seem to be exactly the same problem since the answers didnt help me.
I am instantiating a rigidbody and add velocity to it (its a gun projectile, what else?). Its a small "energy ball" and you can watch it fly off. The problem is, especially when the player is moving, you can see the rigidbody "flicker" while flying, as if it was switching between 2 parallel paths very quickly. Unfortunately interpolation doesnt solve that, though it reduces the intensity of the flickering. I dont even know what code to show you, since its just a simple instantiate:
var clone : Rigidbody;
clone = Instantiate(projectile, muzzleTransform.position, transform.rotation);
clone.velocity = transform.TransformDirection (Vector3.forward * velocity);
This is a simplified version, because the real one also takes the players speed into account, but it happens on both. Any ideas?
Your answer
Follow this Question
Related Questions
Objects Instantiating at wrong position 3 Answers
one gameobject instantiaton not 100 3 Answers
instantiate finding upstream velocity 1 Answer
2D bullet changes direction based on player's world position? 2 Answers
RigidBody2D Movement Stuttering 3 Answers