- Home /
Advanced collisions: mesh collision?
Hi all.
This is somehow related to my previous question about trains and rail tracks. Now I have some rail tracks and train on it. Rail tracks have Box collider
collider set. The train itself has Box collider
too. But it is too general model. I want more precise collision detection, in a way that train car wheels collide with tracks, so I can implement something like train derailment or more advanced physics events. Can you suggest a possible way to improve collision detection? Exactly: how can I make a collider that detects a collision between each rail and train car's wheels on it?
Thanks.
Oh that's easy (I think).
Use something like this:
function OnCollisionEnter (wheel$$anonymous$$esh : Tracks) {
//stuff
}
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
make a train follow tracks using physics 1 Answer
Collision problem 0 Answers