Difference between revisions of "R3d.Body:testPointInside"

From GiderosMobile
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
 
'''Available since:''' Gideros 2019.10<br/>
 
'''Available since:''' Gideros 2019.10<br/>
 
'''Class:''' [[R3d.Body]]<br/>
 
'''Class:''' [[R3d.Body]]<br/>
Line 12: Line 11:
 
'''World Query Collider'''
 
'''World Query Collider'''
  
A world query collider is a collider used to perform world queries on it. World queries are manual queries perform on the physics world like raycasting or testing if two collider collide or overlap.
+
A world query collider is a collider used to perform world queries on it. World queries are manual queries perform on the physics world like raycasting or testing if two colliders (fixtures) collide or overlap.
  
 
=== Parameters ===
 
=== Parameters ===
'''x''': (number) the position of the point in the X axis world coordinate<br/>
+
'''x''': (number) the position of the point in the x axis world coordinate<br/>
'''y''': (number) the position of the point in the Y axis world coordinate<br/>
+
'''y''': (number) the position of the point in the y axis world coordinate<br/>
'''z''': (number) the position of the point in the Z axis world coordinate<br/>
+
'''z''': (number) the position of the point in the z axis world coordinate<br/>
  
 
=== Return values ===
 
=== Return values ===

Latest revision as of 01:50, 19 December 2025

Available since: Gideros 2019.10
Class: R3d.Body

Description

Checks if a 3D point is inside a RigidBody.

(bool) = r3d.Body:testPointInside(x,y,z)

World Query Collider

A world query collider is a collider used to perform world queries on it. World queries are manual queries perform on the physics world like raycasting or testing if two colliders (fixtures) collide or overlap.

Parameters

x: (number) the position of the point in the x axis world coordinate
y: (number) the position of the point in the y axis world coordinate
z: (number) the position of the point in the z axis world coordinate

Return values

Returns (boolean) true if a point is inside a RigidBody

Example

local tpi = player1.body:testPointInside(0, 1, 0)
if tpi then
	print(tpi)
end