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…
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,
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 guess I have too much stuff assigned to the character. So I can not destroy/clone it that simple. But it's propably the only way I can do this, you are right. I tried disabling the character controller but with no success, as it does not derive from MonoBehaviour it does not have the enabled property.
I guess I have too much stuff assigned to the character. So I can not destroy/clone it that simple. But it's propably the only way I can do this, you are right. I tried disabling the character controller but with no success, as it does not derive from MonoBehaviour it does not have the enabled property.
– swisscoderInstantiating my character is terribly slow. If it's not possible to instantiate the character faster, then this is not the solution yet.
– swisscoderInstantiating took so long, because my character controller system was coupled too tight to the prefab I used for the player. I'll mark it as answer.
– swisscoderexcept its not. If i look, its there and clicking on it makes it say its not missing.
– warhammercasey