Change Collision Shapes
A collision shape is the surface area around an object that gets affected when two objects from different collision groups collide.
For example, even though it looks like the ball in the image on the left can clearly make it over the cone obstacle, it will actually collide with it. If you click the Collision Shape Editor button in the scene, you will see in the image on the right that the cubic collision shape of the ball will graze the top of the conic collision shape of the obstacle. If not, see Viewing Collision Shapes.
Here’s what you need to know about collision shapes:
- A collision shape may be the same physical shape as the object or be of different shape, for example, a cone can have a cylinder collision shape.
- You can expand a collision shape in size, as if to add padding to the object, typically to increase the collision surface of the object.
- You can also move a collision shape away from the object.
Thus, when two assets collide, for example, when a character runs into an obstacle, it is their collision shapes that get affected, not the objects themselves.
To change a collision shape of an asset:
- On the Mind Map, double-click the World node where you want to change a collision shape of an asset.
The Scene Editor is displayed.
- On the toolbar, click the Collision Shape Editor button.
- Select the asset in the scene.
- In the Options panel on the right, in the Collision Shape field, select the shape you need.
- Mesh—A sophisticated shape, with outer and inner vertices created to reflect the shape details, such as a hole in a torus, for example, which would let objects go through it during a collision.
- Hull—A “solid” shape that reflects only the outer frame of the selected shape, without details such as a hole in a torus, for example. No objects can go through a Hull collision shape.
- If you select Mesh or Hull, in the Collision Mesh field that appears below, click the Edit icon and select the appropriate shape from Mesh Manager and click Save.