Unity Movement [RigidBody vs Translate]
Why Stack Overflow recommends it
Stack Overflow users link it when asker's objects clip through walls or stutter, to explain when to use Translate versus Rigidbody movement methods.
Recommended by 3 people across 3 different months, 2020 to 2022.
What it is
A short Unity tutorial from the Press Start channel comparing ways to move a player or object: Transform.Translate versus Rigidbody-based movement. It covers why Translate ignores collisions, then shows three Rigidbody options (AddForce, setting velocity, MovePosition) and when each suits best.
What people said
Recommends Harry · 2020-10 · Stack Overflow · on “Character freezes when it moves automatically”
Firstly, put movement code inside FixedUpdate if that doesn't work continue reading... The lag like the movement is likely not from actual lag due to this seeming to be a simple unity project but first, check the fps by checking stats [LINK] and check unity's profiler [LINK] if you want to be sure and find out how to optimise the game. Find out if the rigidbody has any drag and set it to 0 and test if there is still discrete movement. Next check all types of movement in unity, there are three ways to move an object without having it clip through walls: The first one is by setting velocity which is the one you chose. The second one is by using AddForce which in my experience have not found an
Recommends Salvatore Ambulando · 2021-04 · Stack Overflow · on “Can't get 3d objects to stop from overlapping”
transform.Translate() just moves a gameobject, it doesn't know or care what else exists in the world. If you're using rigidbodies, you want to use myRigidBody.MovePosition() . If you aren't, then you need to find a way to manually detect and handle collisions. More information here: [this video] [LINK] [LINK]
Recommends AmNI5TIa · 2022-04 · Stack Overflow · on “Unity3d - Rigidbody vs CharacterController vs transform.Translate for Sidescroller”
this Unity Which Movement You Should Choose [this video] should help you a lot and answer your questions. Advice: for future plan to create your own movement logic without using any build-in components that is very good practice.
Cites RunRajRun · 2020-01 · Stack Overflow · on “Input for block breaker game”
@Jichael Sorry I'm kind of new to scripting. I can't see any other way to move the paddle other than using Translate, but that isn't used for detecting collisions I believe? [this video]