Repository navigation
Prop
Prop is a lightweight core entity for physical or interactive objects.
Props can remain completely static, or optionally use lightweight physics when carried or dropped. Unlike a full rigid-body physics system, Prop physics is deliberately inexpensive and is designed not to choke the LogicThread.
Can be activated and interacted with via the I/O system
For examples see
maps/and the example Prop assetassets/models/prop_book.obj
-
All fields are optional
-
Model- model used to render the Prop -
Texture- optional texture/material override -
Sprite- use a billboarded sprite instead of a 3D model -
Usable- if enabled, the player can press E to pick up the Prop -
Pickup Enabled- allows the Prop to be picked up -
Pickup Reach- maximum distance at which the Prop can be picked up -
Carry Distance- distance in front of the player while being carried -
Carry Offset- positional offset applied while carrying
-
Physics- enables lightweight drop physics -
Gravity- applies gravity while the Prop is moving -
Damping- reduces movement over time -
No Collision- disables floor collision -
Drop Velocity- initial velocity when the Prop is dropped -
Angular Velocity- rotation applied while the Prop is moving
Physics is only simulated while the Prop is moving. Once it comes to rest it is removed from the active physics work until interacted with again.
This makes it possible to use large numbers of Props without requiring a full rigid-body simulation.
| Input | Description |
|---|---|
Pickup |
Pick up the Prop |
Drop |
Drop the Prop |
| Output | Description |
|---|---|
OnPickedUp |
Fired when the player picks up the Prop |
OnDropped |
Fired when the player drops the Prop |
OnRest |
Fired when the Prop finishes moving and comes to rest |