Element/Collision shape: Difference between revisions
Jump to navigation
Jump to search
Line 8: | Line 8: | ||
==XML syntax== | ==XML syntax== | ||
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<colcube posX="1024.768" posY="1248.1024" posZ="800.600" .../> | <colcube posX="1024.768" posY="1248.1024" posZ="800.600" width="100" height="100" depth="100"/> | ||
<colsphere posX="1024.768" posY="1248.1024" posZ="800.600" radius="100"/> | |||
<coltube posX="1024.768" posY="1248.1024" posZ="800.600" radius="30" height="15"/> | |||
<colrectangle posX="1024.768" posY="1248.1024" posZ="800.600" width="100" depth="61.8"/> | |||
<colcircle posX="1024.768" posY="1248.1024" posZ="800.600" radius="30"/> | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 21:24, 21 May 2008
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
<colcube posX="1024.768" posY="1248.1024" posZ="800.600" width="100" height="100" depth="100"/> <colsphere posX="1024.768" posY="1248.1024" posZ="800.600" radius="100"/> <coltube posX="1024.768" posY="1248.1024" posZ="800.600" radius="30" height="15"/> <colrectangle posX="1024.768" posY="1248.1024" posZ="800.600" width="100" depth="61.8"/> <colcircle posX="1024.768" posY="1248.1024" posZ="800.600" radius="30"/>
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