0 votes

I plan to have a boat in my 3d game that the player will be able to mount and control around in the water. What would be the best way to change the controls to the boat and keep the player in the boat?

The method I'm currently using is setting the global translation of the player to that of the boat, if it's being ridden. This seems like it could be considered bad practice, but I can't find much information on it.

in Engine by (612 points)
edited by

You can use the RemoteTransform node..
https://docs.godotengine.org/en/latest/classes/class_remotetransform.html

...to synch the positions of two spatials in the same scene.
I.e.:
You'd put the RemoteTransform as child of the boat and set the remote path to match your player. You could also do it the other way round but a boat typically moves differently compared to a walking player. Maybe you want to make it a rigidbody and work with applied forces.

Ah, thanks. That's just what I needed. I'm still having trouble moving the rigidbody boat in the right direction. Are there any examples of this? I can't find any

Please log in or register to answer this question.

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 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.