Collision Meshes

From Rigs of Rods Wiki

Jump to:navigation, search

Contents

Collision Mesh Troubleshooting

Forward

So you just made an absolutely amazing [insert amazing, knock-your-socks-off object for RoR here] If you're like me, the reason you've been procrastinating so much on exporting is because you don't want to deal with the complicated and irritating task of getting collision meshes to work. They never seem to work the first time, and you can't identify the problem, resulting in gray hairs, chronic anxiety, and eventual cardiac failure if the problem persists. This guide will give you some helpful hints as to fixing the problems. Please note: By "failures" I mean the truck falls through the mesh and gets stuck.

Common Problem 1: FPS drop

PROBLEM: Bounding box causes huge fps drop.

SOLUTION: Make a simpler collision mesh.

Common Problem 2: Random Collisions

PROBLEM: Seemingly random collisions into random invisible objects around the object in question/no collision with object or collision several meters below surface of object.

SOLUTION: Your collision mesh is either centred wrong or badly scaled. Or both. If you're modelling in Blender, hit CTRL+A in object mode to apply scale and rotation to your object before exporting so that it exports at the size that you actually see. Try to get the centres of your collision mesh and object as close together as possible. If you're using SketchUp...then figure it out yourself; I can't help you. Get a real 3D modelling program. Or add helpful info here, remember that this is a Wiki.

Common Problem 3: Location-based collision failures

PROBLEM: Failures of collision mesh based on location of object.

SOLUTION: The collision mesh of the object is intersecting with that of another. Move the object. You could also fix the collision mesh so that it doesn't intersect.

Common Problem 4: General collision failures

PROBLEM: Failures of collision mesh in general

SOLUTION: There are one or more faces intersecting in your mesh. Rigs of Rods doesn't like bounding faces intersecting with each other. Make it one continuous surface rather than a collection of boxes. Or, at least, make the collision mesh like this.

Common Problem 5: Vehicles getting "sucked in" to a collision mesh

PROBLEM: You're driving along, testing your new mesh... then instead of crashing into it, you get sucked in. And now you can't get out.

SOLUTION: Your collision mesh's normals are flipped the wrong way. Flip them the right way out and you ought to be fine.