Skip to content

Physics

Mikulas Florek edited this page Jan 3, 2016 · 11 revisions

LumixEngine uses PhysX as physics engine, however it is encapsulated as a plugin, therefore any other physics engine can be used.

There are 4 physics component types:

  • Box
  • Mesh
  • Heightfield
  • Character controller

Contact

When two rigid bodies collide, contact event is generated and sent to script.

Collision filters

Collisions can have different outcome for different objects. For example if we want to determine visibility, we do not want raycast to collide with glass. But normal objects (bullets, flies, ...) should collide. Physical layer is a "type" of physical objects and each object is in exactly one layer. Two objects do not collide if their layers do not collide.

Collision matrix (which layer collides with which) can be set in "Physics" window:

Collision matrix

Also layers can be added, removed or renamed here.

Layers can be assigned to objects in the property grid:

Layer

Clone this wiki locally