- Home /
Mesh Collider + Character Collider + moving Platforms
Ok, I know how (in theory) to make a moving platform. I'm just wondering how it works, the character controller positioning, of that makes sense. I'd like to make my moving platform be a vehicle - the roof of the car changes (hood, body, trunk). I'd have a mesh collider on the vehicle, and have a box (trigger) collider to determine when the player interacts with the vehicle.
I plan on programming my vehicles manually, so they'd be kinematic. My character controller is kinematic. I know that in order to make the character move with a vehicle, I'd parent the character controller to the vehicles game object when the player enters the trigger. But how does the rest work? Would there be a collision between the player and vehicle mesh still to determine where exactly the player lands? Eg, I the player jumps on the hood of the car, it's be positioned on the hood and just not floating in air (treating the vehicle as a box and not like a varying height mesh)
I'm sorry if this is a basic or obvious question, I'm rusty to Unity3D. I keep looking at the collision matrix and I'm just not seeing how the collisions will work in this instance, as the vehicle and the player would both be kinematic (unless the character controller is a special case to all this).
JUst one other thing to bear in $$anonymous$$d - inertia would be a big effect if you were on the roof of a car. Sudden acceleration or braking ought to try to fling your character off - but perhaps you are deliberately wanting to ignore that?
Ignore it. The only sudden braking or acceleration would occur if the player was infont of the vehicle and it needed to stop. Thats a whole different problem. Basically, the vehicles are moving platforms to get you from A to B. the only reason why I say vehicle is that they take the shape of a car (moving platform of a varying height).
The only info I've found on moving platforms run with the assumption that it's a flat even surface to land on, which is not true given tge shape of a vehicle.
Character controller can support walking up angled surfaces so you should be fine.
I would suggest that you make your vehicle have a set of aligned primitive colliders, it will be easier to debug.
Your answer
![](https://koobas.hobune.stream/wayback/20220613074507im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
colliding characters and meshes 0 Answers
How to prevent Character Controller from falling through moving Platforms? 4 Answers
Collision between Character Controller and Box Collider 2 Answers
How to move multiple dynamic gameobjects with one moving platform which is controlled by the player 0 Answers