Element/Collision shape: Difference between revisions
Jump to navigation
Jump to search
m (elements -> physical entities) |
No edit summary |
||
Line 4: | Line 4: | ||
The collision shape class represents invisible collision detection shapes that can be created in the GTA world. Collision shapes are typically used to detect physical entities moving through them and perform actions when they do. | The collision shape class represents invisible collision detection shapes that can be created in the GTA world. Collision shapes are typically used to detect physical entities moving through them and perform actions when they do. | ||
The element types for this class are '''"colcube"''', . | The element types for this class are '''"colcube"''', '''colcube'', '''colrectangle''', '''colcuboid''' and '''colcircle'''. | ||
Colshapes cannot have their corners/radius specified via XML currently, which makes their xml representation essentially useless. | |||
==XML syntax== | ==XML syntax== | ||
Line 15: | Line 17: | ||
* '''posY''': A float representing the Y position of the vehicle. | * '''posY''': A float representing the Y position of the vehicle. | ||
* '''posZ''': A float representing the Z position of the vehicle. | * '''posZ''': A float representing the Z position of the vehicle. | ||
===Optional Attributes=== | ===Optional Attributes=== | ||
* ''' | * '''dimension''': The dimension the colshape is in | ||
==Related scripting functions== | ==Related scripting functions== | ||
{{Collision shape functions}} | {{Collision shape functions}} | ||
[[Category:Element Types]] |
Revision as of 16:41, 1 January 2008
This article needs checking. | |
Reason(s): Needs confirmation on the XML syntax for all colshape types. --jbeta 06:33, 23 August 2007 (CDT) |
The collision shape class represents invisible collision detection shapes that can be created in the GTA world. Collision shapes are typically used to detect physical entities moving through them and perform actions when they do.
The element types for this class are "colcube"', colcube, colrectangle, colcuboid and colcircle.
Colshapes cannot have their corners/radius specified via XML currently, which makes their xml representation essentially useless.
XML syntax
<colshape posX="" posY="" posZ="" .../>
Required Attributes
- posX: A float representing the X position of the vehicle.
- posY: A float representing the Y position of the vehicle.
- posZ: A float representing the Z position of the vehicle.
Optional Attributes
- dimension: The dimension the colshape is in
Related scripting functions
- addColPolygonPoint
- createColCircle
- createColCuboid
- createColPolygon
- createColRectangle
- createColSphere
- createColTube
- getColPolygonHeight
- getColPolygonPoints
- getColPolygonPointPosition
- getColShapeType
- getColShapeRadius
- getColShapeSize
- getElementColShape
- getElementsWithinColShape
- isElementWithinColShape
- isInsideColShape
- removeColPolygonPoint
- setColPolygonHeight
- setColPolygonPointPosition
- setColShapeRadius
- setColShapeSize