Hi, is there a way to detect and do the collison for shapes like pinball ramp? Right now i could have the collision working for the external shape of the ramp, but i could like the pinball to be able to enter the ramp but instead it is currently block outside..i am using the mobile mesh codings provided by another post.
viewtopic.php?f=4&t=1325
Thanks alot to vectoroO for providing the codings
Hopefully someone will be able to guide me along...thanks!
Collision with shapes like pinball ramp?
Re: Collision with shapes like pinball ramp?
First, I would recommend checking out the BEPUphysicsDemos (contained in the main source download) for a bunch of examples.
For a static pinball ramp, a common approach would be to model it as a mesh and create a StaticMesh object from it. Check the StaticMeshDemo for an example of its usage. Only if it is a moving mesh should you use a MobileMesh, and even then, it's generally faster to use an approximation composed of simpler primitives (perhaps bound together in a compound shape).
If you find that the mesh detects collisions from one direction but not the other, then the sidedness of the mesh needs to be changed. A StaticMesh has a Sidedness property (and MobileMeshes accept a sidedness/solidity in their constructor). Try switching it to the opposite setting, or, if needed, set it to double sided.
For a static pinball ramp, a common approach would be to model it as a mesh and create a StaticMesh object from it. Check the StaticMeshDemo for an example of its usage. Only if it is a moving mesh should you use a MobileMesh, and even then, it's generally faster to use an approximation composed of simpler primitives (perhaps bound together in a compound shape).
If you find that the mesh detects collisions from one direction but not the other, then the sidedness of the mesh needs to be changed. A StaticMesh has a Sidedness property (and MobileMeshes accept a sidedness/solidity in their constructor). Try switching it to the opposite setting, or, if needed, set it to double sided.