3D switching controls to vehicle

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

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.

You can use the RemoteTransform node…

…to synch the positions of two spatials in the same scene.
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.

wombatstampede | 2020-03-20 09:11

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

andersmmg | 2020-03-20 12:52