- Home /
RigidBody.velocity or transform.position
Hello, I have a game with Turrets. As they shoot, they produce many projectiles (probably thousands). Every projectile has a script on it, which moves the projectile using
transform.position += transform.forward * speed * Time.deltaTime;
in the Update method. I thought about using RigidBody force instead, as the projectiles have attached rigidbodies anyway. When I use force, I only have to set the rigidBody velocity in the Start() method.
I don't know, whether I should use the physics movement using rigidBody.velocity or transform.position.
Which one is better in performance with hundreds/thousands of gameObjects?
I also thought about merging projectiles into one gameObject and creating meshes, but because of the projectile Inaccuracy and deviation this would be very hard.
Answer by Raresh · Jan 24, 2017 at 02:25 PM
Use velocity please. There are a lot of reasons why.
Thank you, Could you give me some of the reasons please? So I can understand you point?
Your answer
Follow this Question
Related Questions
unity sometime execute instruction and sometime ignore same instruction ?! 2 Answers
HELP! Scripts looks fine but doesn't respond? 1 Answer
Similar movement to a game (look description) 1 Answer
Is it recommended to do scientific modelling in unity or should i write a standalone program 3 Answers
How to assign one script on different gameobject of 1 prefab and make them run one by one 0 Answers