Attach player to object and disable player movement

Hi! I have tried to make a script that attaches a player to a vehicle / object and disables the player’s movement, e.g. by disabling the Character Controller Component. The player doesn’t have a Rigidbody component so I haven’t really found a good way to do this.

Does anyone have any ideas on how this could be done?

1 Answer

1

If I understand correctly, you have disabled the character controller component, that should work. And as for the rest you can just parent the player to the vehicle. The doc for Transform.SetParent.

Could you mark right if this is the answer you needed.