wiki.sine.space | sinespace

Difference between revisions of "Scripting/SPhysics"

From wiki.sine.space
Jump to: navigation, search
 
Line 2: Line 2:
  
 
==Members==
 
==Members==
{{ScriptFunction|SPhysicsHit|[] RayCast|(SVector origin, SVector normal, float distance);|Raycasts from origin along normal, distance meters - and returns the list of collided objects in distance order (closest first)}}
+
{{ScriptFunction|SPhysicsHit|RayCast[]|(SVector origin, SVector normal, float distance);|Raycasts from origin along normal, distance meters - and returns the list of collided objects in distance order (closest first)}}
{{ScriptFunction|SPhysicsHit|[] SphereCast|(SVector origin, float radius, float distance);|Sweeps from origin in a spherical ray 'radius' wide, and returns the list of collided objects}}
+
{{ScriptFunction|SPhysicsHit|SphereCast[]|(SVector origin, float radius, float distance);|Sweeps from origin in a spherical ray 'radius' wide, and returns the list of collided objects}}
{{ScriptFunction|SPhysicsHit|[] CapsuleCast|(SVector origin, SVector end, float radius, float distance);|Sweeps a capsule from origin to end, radius wide and returns the list of collided objects}}
+
{{ScriptFunction|SPhysicsHit|CapsuleCast[]|(SVector origin, SVector end, float radius, float distance);|Sweeps a capsule from origin to end, radius wide and returns the list of collided objects}}
{{ScriptFunction|SPhysicsHit|[] BoxCast|(SVector origin, SVector halfExtents, SVector direction, SQuaternion orientation, float distance);|Sweeps a box defined by origin+halfExtents along directiojn, distance meters with a orientation matching orientation - and returns the collisions in distance order.}}
+
{{ScriptFunction|SPhysicsHit|BoxCast[]|(SVector origin, SVector halfExtents, SVector direction, SQuaternion orientation, float distance);|Sweeps a box defined by origin+halfExtents along directiojn, distance meters with a orientation matching orientation - and returns the collisions in distance order.}}
  
 
{{Scripting Navbox}}
 
{{Scripting Navbox}}

Latest revision as of 13:15, 17 January 2017

The SPhysics class allows you to interact with the physics scene. See also Scripting/SRigidbody.

Members

RayCast[]

SPhysicsHit RayCast[] (SVector origin, SVector normal, float distance);

Raycasts from origin along normal, distance meters - and returns the list of collided objects in distance order (closest first)

No example provided yet

SphereCast[]

SPhysicsHit SphereCast[] (SVector origin, float radius, float distance);

Sweeps from origin in a spherical ray 'radius' wide, and returns the list of collided objects

No example provided yet

CapsuleCast[]

SPhysicsHit CapsuleCast[] (SVector origin, SVector end, float radius, float distance);

Sweeps a capsule from origin to end, radius wide and returns the list of collided objects

No example provided yet

BoxCast[]

SPhysicsHit BoxCast[] (SVector origin, SVector halfExtents, SVector direction, SQuaternion orientation, float distance);

Sweeps a box defined by origin+halfExtents along directiojn, distance meters with a orientation matching orientation - and returns the collisions in distance order.

No example provided yet