Element/Collision shape: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (elements -> physical entities)
m (Добавление языков)
 
(13 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Needs Checking|Needs confirmation on the XML syntax for all colshape types. --[[User:Jbeta|jbeta]] 06:33, 23 August 2007 (CDT)}}
__NOTOC__
__NOTOC__
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 type for this class is '''colshape'''.


==XML syntax==
==XML syntax==
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<colshape posX="" posY="" posZ="" .../>
<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>


===Required Attributes===
===Required Attributes===
* '''posX''': A float representing the X position of the vehicle.
* '''posX''': A float representing the X position of the colshape.
* '''posY''': A float representing the Y position of the vehicle.
* '''posY''': A float representing the Y position of the colshape.
* '''posZ''': A float representing the Z position of the vehicle.
* '''posZ''': A float representing the Z position of the colshape.
* '''...''': ...
* '''radius''': The radius of the colshape (spheres, tubes and circles only).
* '''width''': The width of the colshape (rectangles and cubes only).
* '''depth''': The depth of the colshape (rectangles and cubes only).
* '''height''': The height of the colshape (cubes only).


===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]]
[[en:Element/Collision shape]]
[[ru:Element/Collision shape]]
[[hu:Element/Collision shape]]
[[it:Elemento/Collision shape]]

Latest revision as of 09:58, 15 April 2021

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 type for this class is colshape.

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 colshape.
  • posY: A float representing the Y position of the colshape.
  • posZ: A float representing the Z position of the colshape.
  • radius: The radius of the colshape (spheres, tubes and circles only).
  • width: The width of the colshape (rectangles and cubes only).
  • depth: The depth of the colshape (rectangles and cubes only).
  • height: The height of the colshape (cubes only).

Optional Attributes

  • dimension: The dimension the colshape is in

Related scripting functions