0
\$\begingroup\$

So I was trying to understand the differences between different ways to move an object in Unity and got opposite answers in different places. Here is what I was able to figure out though. I would ask you to check and correct me if I am wrong at any of them:

  • transform.Translate has nothing to do with the physics. It simply teleports the object from point A to point B.
  • MovePosition for kinematic bodies slides (instead of teleporting) the object from point A to B + interpolates the object position in the frames to be rendered in-between FixedUpdate calls.
  • MovePosition for non-kinematic bodies ( aka dynamic ) teleports them from point A to point B.
\$\endgroup\$
3
  • \$\begingroup\$ Don't forget to include velocity or force-based methods. In my experience, I've found them to be the most reliable and consistent in how they interact with other physics objects. \$\endgroup\$
    – DMGregory
    Feb 27, 2019 at 16:59
  • \$\begingroup\$ @DMGregory ♦, I am not very familiar with the API, so can you tell me what functions are you talking about exactly? :) \$\endgroup\$ Feb 28, 2019 at 9:30
  • \$\begingroup\$ Nothing complicated or cryptic, just the ones with "force" or "velocity" in their names. \$\endgroup\$
    – DMGregory
    Feb 28, 2019 at 12:03

0

You must log in to answer this question.

Browse other questions tagged .