attach character (with character controller) to vehicle with physics(wheel colliders,rigidbody)

Hi there

I have a vehicle, that is able to drive (wheel colliders/physics)

And I have a 3rd person Character that can move.

I disable the movement of the character, when I click on the vehicle and enable the vehicles driving system. I also parent the vehicle to the character.

My problem is that the Character does not move with the vehicle. If I delete the character controller of the character, then it does move with the vehicle…

What could I do?

  • Remove/Add the character controller?
  • Glue the character “better” to the vehicle?

I don’t think you can move / ‘glue’ an object with a character controller on by physics, as in joints etc. I think it’s always setting it’s position or something.

Have you tried prefabbing your whole character? Instantiate it to start with,

clone = Instantiate(mycharacter, myposition, myrotation);
then destroy it
Destroy(clone);
when getting in the vehicle, then instantiate it offset to the vehicle when you get out? You could replace the character with another prefab of one without the character controller if you needed the model to be viewable, or if you have an animation of it getting in or something.

i have an issue somewhat related to this but the vehicle is parented to the character and idk how to unparent it without messing up a game