Moving towards a point smoothly

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jee_gbg

Hello, my question is what the title says,

Let’s say i have two points, a and b.

How i could move a kinematicbody smoothly between a and b?

Thanks

:bust_in_silhouette: Reply From: spaceyjase

How do you want to move it?

  • Use an animation
  • Use lerp on its transform.
  • Use a Tween and interpolate between a and b.
  • Define a path and use a PathFollow node.

Note a KinematicBody interacts with physics so you probably mean to use a RigidBody instead if you don’t intend to use move_and_slide (or related functions).

I’m moving the kinematic in the physics process, so i want to use move_and_slide. I would want to know how to move to “b” with move_and_slide, and how much velocity should i add per physics tick relative to the distance between the two points (a and b). Thanks

jee_gbg | 2021-12-03 23:07

:bust_in_silhouette: Reply From: jee_gbg

After seeing this video https://youtu.be/kwbPThtHbvA, i just realized how stupid i was, i could explain it on this answer but the video explains it almost perfectly. Check it out, is very simple!