Non-Kinematic movement via code

Hi guys, I would like some clarification on something. If I’m setting a gameobject’s position in code, but I don’t have isKinematic set to true, my object moves correctly and still responds to gravity (use Gravity is ticked) so it seems to be a combination of the two systems. Will this cause issues?
Thanks

1 Answer

1

It depends on how you’re moving it. The transform.Translate() function will definitely cause problems, but changing the rigidbody.velocity directly seems to be safe. I can’t tell you with 100% certainty but it’s how I’m working and so far all is fine.

Sorry I can’t give you a more certain response. Keep your eyes open for strange behavior when using functions like OnTriggerEnter or OnCollisionEnter etc.

Thanks for the tip - much appreciated!