Add physics to a mesh
Physics lets meshes block objects, move under gravity, or detect overlaps. meshy generates invisible collision shapes from your geometry.
Configure a floor and prop
Section titled “Configure a floor and prop”In your own 3D scene, create two boxes: a wide, flat floor and a smaller prop positioned above it.
- Select the floor.
- In the Inspector’s Physics resource picker, choose MeshyStaticPhysicsSettings.
- Select the prop.
- In its Physics picker, choose MeshyRigidPhysicsSettings.
- Leave Shape Mode at Auto.
- Add a
Camera3Dpositioned to view both boxes and make it current. - Save the scene and press F6 to run it.
The floor stays fixed, and the prop falls onto it.
Choose a mode:
| Mode | Use it for |
|---|---|
| Static | Fixed floors and walls |
| Animatable | Platforms that an animation or script moves |
| Rigid | Props that gravity, forces, and collisions move |
| Trigger | Areas that detect overlaps or change gravity and damping |
| None | Visible geometry without collision or simulation |
To remove physics, clear Physics or choose MeshyNonePhysicsSettings.
Understand the default
Section titled “Understand the default”New meshes inherit settings from a MeshySettingsProvider above them in the scene tree. One provider can configure several meshes. Its Physics field starts empty. Choose settings there or on each mesh.
Choosing Static or Rigid overrides inheritance. See physics settings for shared presets and scene boundaries.
See the collision shapes
Section titled “See the collision shapes”- In the editor, enable Meshy toolbar > Visibility > Collision Shapes.
- To see shapes through the mesh, choose View > Gizmos > Meshy Collision Shapes > On Top.
Debug Color and Fill change the collision display’s appearance.
Before export, rebuild missing or outdated collision in the editor. Save afterward. See collision limits.
For game scripts, see the physics API.