0 votes

I have a Rigidbody2D which moves around the scene based on input . How to make another Rigidbody2D follow the former in the same path behind it?

in Engine by (78 points)

2 Answers

0 votes
Best answer

I'm not sure what sort of following here but I think one solution could be to use interpolation. you can find details on it in the docs: https://docs.godotengine.org/en/stable/tutorials/math/interpolation.html

You could play around with the position you "interpolate to" and the speed to maybe get the behavior you want.

by (106 points)
selected by
0 votes

Duplicate the RigidBody2D and make the starting point of the second body so it's behind the first body.

by (298 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.