Collisions
最終更新
最終更新
The colliders (or bounding box) are the three-dimensional boundaries of an asset that will have physical interactions with other assets in the Game. This makes an object such as a wall solid or allows a ball to be kicked.
Think of these as invisible boxes your assets are placed inside.
The collider is defined by the extreme points of the model and creates a mesh that encompasses the whole asset.
These are assets made of a single model, the collider is the volume box itself.
If the volume box is bigger than the asset, the collider will be bigger as well, regardless of the empty space.
The collider doesn’t take the empty space of the VXM object into account.
For example, a separate collider won't be created for unconnected sections, or if the surface is concave.
The traffic light above is convex; there is a curve to the overall shape, and you may want a player to walk underneath it, but because it is a single asset the bounding box will be treated as a rectangle and act as a solid wall.
To avoid this and to have it behave correctly, the object has to be created by joining smaller separate sections in the Animator, so the final model will turn out to be a compound entity.
The gap between this vase and the chair presents a similar problem to what happened with the traffic light, but in this case, the solution is not to create a Compound Entity. Instead, two simple entities should be exported separately (vase and bench), then they can be placed in the Game Maker as separate objects in the desired arrangement.
These are assets made of 2 or more models rigged with a skeleton of multiple nodes.
You need to use the Animator to create a compound asset.
Static assets only have 1 animation with a single frame. The game maker won’t detect this as an animation.
For these assets, each model keeps its own collider volume.
Here we have a simple static asset inside its original bounding box, which creates an unnatural collision in Game Maker.
Now we break up that same chair into multiple models with their own tighter collision volumes and Rig them in the Animator for the same appearance, but with a much more natural interaction in Game Maker.
Break up a model quickly by cloning your original model and removing unwanted voxels or by selecting desired voxels and choosing "Save Selected Voxels" in the Edit menu for each model "slice" you want to make. Keep in mind these slices will have the same collision volume and pivot point as the original and must be trimmed.