This component adds a collision model to its entity. More...
Public Member Functions | |
SetBoundingBox (number min_x, number min_y, number min_z, number max_x, number max_y, number max_z, string MatName) | |
Sets the given bounding-box as the collision model. More... | |
Public Member Functions inherited from ComponentBaseT | |
any | get (string var_name) |
Returns the value of an attribute (a member variable) of this class. More... | |
set (string var_name, any new_value) | |
Sets an attribute (a member variable) of this class to a new value. More... | |
string | GetExtraMessage (string var_name) |
Returns the result of VarBaseT::GetExtraMessage() for the given member variable. More... | |
interpolate (string var_name, number start_value, number end_value, number time) | |
Schedules a value for interpolation between a start and end value over a given period of time. More... | |
EntityT | GetEntity () |
Returns the entity that this component is a part of (or nil if the component is currently "stand-alone", not a part of any entity). More... | |
InitClientApprox (string VarName) | |
Registers the given attribute (a member variable) of this class for interpolation over client frames in order to bridge the larger intervals between server frames. More... | |
OnInit () | |
This method is called for each component of each entity as the last step of initializing a newly loaded map. More... | |
OnClientFrame (number t) | |
This method is called for each component of each entity before the client renders the next frame. More... | |
Public Attributes | |
string | Name |
The file name of the collision model. More... | |
boolean | IgnoreOrient |
If true, the orientation of the entity does not affect the orientation of the collision model. More... | |
This component adds a collision model to its entity.
Note that the variables of this class (also referred to as "Public Attributes" or "Member Data") must be used with the get() and set() methods at this time – see get() and set() for details.
If you would like to create a new component of this type explicitly (those defined in the CaWE Map Editor are instantiated automatically), use WorldT::new():
SetBoundingBox | ( | number | min_x, |
number | min_y, | ||
number | min_z, | ||
number | max_x, | ||
number | max_y, | ||
number | max_z, | ||
string | MatName | ||
) |
Sets the given bounding-box as the collision model.
Instead of loading a collision model from a file, a script can call this method to set a bounding-box with the given dimensions as the collision model.
boolean IgnoreOrient |
If true, the orientation of the entity does not affect the orientation of the collision model.
This is used with players, monsters and other NPCs whose world-space collision model must not change when they rotate (in order to not get them accidentally stuck in nearby walls).
bool
string Name |
The file name of the collision model.
std::string