-
Notifications
You must be signed in to change notification settings - Fork 324
physics
- Introduction
- Rigid bodies
- Static bodies
- Trigger bodies
- Ray cast
- Physics World
- Vehicle simulations
- Soft Bodies
- Cloth simulation
- Common pitfalls / troubleshoot
Armory is designed to work with any physics engine. Internally, a glue code is written which binds the physics simulation. This lets you pick the most suitable physics engine depending on project needs and makes Armory future-proof.
If no rigid body is detected in the scene, Armory skips including the physics module to save space and performance. To force the physics module, set Armory Project - Modules - Physics
from Auto
to Enabled
.
By default, Armory is configured to use a full featured Bullet physics. If lighter engine is sufficient, Oimo physics is provided. With Oimo, triangle mesh shapes are approximated using convex hulls.
To pick active physics engine, set Armory Project - Modules - Physics Engine
property.
A rigid body is a type of body that can be used to simulate physical interactions between solid bodies.
To start using rigid body simulations in Armory, they have to be enabled for Blender first. To do so, simply select the object that will interact in the physic simulation, then go to the Physics properties
tab, on the Properties
editor, and click on the Rigid Body
object.
If you hit Play (default F5), the object should be immediately free falling out of view
If this doesn't happen for whatever reason, you may want to give the troubleshoot
section a look.
When you enable rigid body on an object, you will notice an array of options to configure it will appear:
There are two types of rigid bodies, Active
and Passive
. This options allows setting what role has a rigid body in the simulation.
Active
rigid bodies are affected by gravity by default (like you might have noticed earlier), whereas Passive
rigid bodies are not. Active
are mostly used for physics objects that must be controlled through physics interactions (e.g. a character or a car), and Passive
may be used for objects that are not controlled by physics and can interact with Active
rigid bodies (e.g. a platform or a wall).
Make sure your Blender objects that interact in physics simulations always have scale of (1.0, 1.0, 1.0) (rotation and location may be arbitrary) inside of Blender:
You can always apply the scale from within Blender by selecting the object, opening the Object
menu entry and then navigating to Apply
and then clicking on Scale
, or simply hitting the shortcut Ctrl + A
and then hitting the s
key or simply selecting the option from the floating menu.