IsInsideColShape: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function checks if a 3D position is inside a colshape or not. ==Syntax== <syntaxhighlight lang="lua"> bool IsInsideColShape ( cols...") |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
This function checks if a 3D position is inside a colshape or not. | {{New feature/item|3.0156|1.5.5|12286|This function checks if a 3D position is inside a colshape or not.}} | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool | bool isInsideColShape ( colshape theShape, float posX, float posY, float posZ ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[colshape]]:isInside}} | {{OOP||[[colshape]]:isInside}} | ||
===Required Arguments=== | ===Required Arguments=== | ||
*''' | *'''theShape:''' The colshape you're checking the position against. | ||
*'''posX:''' The X coordinate of the position you're checking. | *'''posX:''' The X coordinate of the position you're checking. | ||
*'''posY:''' The Y coordinate of the position you're checking. | *'''posY:''' The Y coordinate of the position you're checking. | ||
Line 28: | Line 28: | ||
==See Also== | ==See Also== | ||
{{Collision shape functions}} | {{Collision shape functions}} | ||
[[hu:isInsideColShape]] |
Latest revision as of 14:07, 10 October 2018
This function checks if a 3D position is inside a colshape or not.
Syntax
bool isInsideColShape ( colshape theShape, float posX, float posY, float posZ )
OOP Syntax Help! I don't understand this!
- Method: colshape:isInside(...)
Required Arguments
- theShape: The colshape you're checking the position against.
- posX: The X coordinate of the position you're checking.
- posY: The Y coordinate of the position you're checking.
- posZ: The Z coordinate of the position you're checking.
Returns
Returns true if the position is inside the colshape, false if it isn't or if any parameters are invalid.
Example
This function checks if an element is within a colshape.
function isElementInsideColShape( theElement, theColShape ) return isInsideColShape( theColShape, getElementPosition( theElement ) ) end
See Also
- addColPolygonPoint
- createColCircle
- createColCuboid
- createColPolygon
- createColRectangle
- createColSphere
- createColTube
- getColPolygonHeight
- getColPolygonPoints
- getColPolygonPointPosition
- getColShapeType
- getColShapeRadius
- getColShapeSize
- getElementColShape
- getElementsWithinColShape
- isElementWithinColShape
- isInsideColShape
- removeColPolygonPoint
- setColPolygonHeight
- setColPolygonPointPosition
- setColShapeRadius
- setColShapeSize