Skip to main content

Collisions


Brakeza3D provides flexible collision modes and shapes, allowing developers to detect collisions, respond to physical interactions, and apply custom gameplay logic through LUA scripts.

All objects instances can participate in the collision system, supporting ghost, rigid body, and kinematic behaviors depending on the configured mode.

From the menu, you can configure fundamental aspects such as gravity strength and various performance settings:

Menu collisions

Collision modes


Collision ModeDescriptionPhysics ReactionTypical UsesSpecial Notes
GhostCollidable object that does not react to physicsNo physical responseTriggers, sensors, detection zonesDetects collisions but is not affected by them
RigidBodyFully physical objectReacts to forces, collisions, and gravityRealistic physics objectsCan be set as static (mass = 0). Only mode allowed for non-convex geometries
KinematicCharacter-like movementControlled by code, not physics forcesPlayer characters, moving platformsMovement handled manually via methods

Collider shapes


Brakeza3D provides several collider shapes that define the physical boundaries of objects for collision detection:

Collider ShapeDescriptionPerformanceTypical UsesNotes
Simple ShapeBasic collider suitable for most objectsExcellentGeneral-purpose objectsSupported by any object
Capsule ShapeCapsule-shaped collider for elongated objectsGoodCharacters, tall or rounded objectsWorks with any Object3D
Triangle MeshMatches exact geometry of a Mesh3D objectLower (more expensive)Static meshes, precise collisionsHigh accuracy, higher computational cost

Collider shapes can be configured either through the GUI or via LUA scripts.

Debug collisions


You can debug the collision system both visually and through the system logs. Visual debugging allows you to display collision shapes and boundaries directly in the scene, making it easier to identify incorrect alignments or unexpected intersections.

Additionally, system logs provide detailed runtime information about collision events, including object interactions and trigger activations, helping you track down logic errors and fine-tune collision behavior.

Debug collisions