GetColShapeType: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 35: | Line 35: | ||
==See Also== | ==See Also== | ||
{{Collision_shape_functions}} | {{Collision_shape_functions}} | ||
[[hu:getColShapeType]] |
Revision as of 10:30, 10 October 2018
This function is used to retrieve the type of an colshape.
Syntax
string getColShapeType ( colshape shape )
OOP Syntax Help! I don't understand this!
- Method: colshape:getShapeType(...)
- Variable: .shapeType
Required Arguments
- shape: The colshape you wish to get the type of.
Returns
Returns a string containing the colshape type, false if invalid arguments were passed.
Example
This example outputs the type of all colshapes.
local circle = createColCircle(0, 0, 1) local cubboid = createColCuboid(0, 0, 0, 0, 0, 0) local sphere = createColSphere(0, 0, 0, 0) local rectangle = createColRectangle(0, 0, 0, 0) local polygon = createColPolygon(0, 0, 0, 0, 0, 0, 0, 0) local tube = createColTube(0, 0, 0, 0, 0) iprint("circle", getColShapeType(circle), circle:getShapeType(), circle.shapeType) iprint("cubboid", getColShapeType(cubboid), cubboid:getShapeType(), cubboid.shapeType) iprint("sphere", getColShapeType(sphere), sphere:getShapeType(), sphere.shapeType) iprint("rectangle", getColShapeType(rectangle), rectangle:getShapeType(), rectangle.shapeType) iprint("polygon", getColShapeType(polygon), polygon:getShapeType(), polygon.shapeType) iprint("tube", getColShapeType(tube), tube:getShapeType(), tube.shapeType)
See Also
- addColPolygonPoint
- createColCircle
- createColCuboid
- createColPolygon
- createColRectangle
- createColSphere
- createColTube
- getColPolygonHeight
- getColPolygonPoints
- getColPolygonPointPosition
- getColShapeType
- getColShapeRadius
- getColShapeSize
- getElementColShape
- getElementsWithinColShape
- isElementWithinColShape
- isInsideColShape
- removeColPolygonPoint
- setColPolygonHeight
- setColPolygonPointPosition
- setColShapeRadius
- setColShapeSize