Tracing Structures

Summary
Tracing Structures
WorldTracedObjectStructure that represents the global world traced object or surface data.
Variables
valid
distance
<vec3> positionThe traced position in world space.
enginePosition
normal
hitCell
blockCoords
gameObject
component
type
matID
userData
EventBodyDataStructure that holds event data of a given object.
Variables
linearVelocity
angularVelocity
position
orientation
gameObject
ContactDataStructure holding basic contact information between two objects.
Variables
closingVelocity
impulse
distance
normal
position
ContactEventDataContact Event data between 2 bodies and their shared contact.
Variables
bodyA
bodyB
contact
TriggerEventDataTrigger Event data between 2 bodies.
Variables
bodyA
bodyB
TracedObjectStructure that represents a traced object and the striking trace’s info.
Variables
distnace
normal
position
object
body
type
extra
matID
TraceResultStructure that holds an array of TracedObject
Variables
hasHits
numHits
objects
TracerInputStructure that holds multiple inputs for a <PhysicsWorld.NKTraceWorld()> call.
Variables
distance
position
direction
extra
gameObjectIgnoreList

WorldTracedObject

Structure that represents the global world traced object or surface data.

Variables

valid

boolflag that states if the object is holding an active trace.

distance

numberThe distance to the traced surface.

<vec3> position

The traced position in world space.

enginePosition

vec3The traced position in (engine calculated) world space.

normal

vec3The traced surface normal.

hitCell

ivec3The hit cell ID.

blockCoords

ivec3The truncated block coordinates

gameObject

GameObjectThe represented GameObject (can be NIL.  Ex: tracing terrain)

component

BasePhysicsComponentThe represented GameObject’s physics component (<RigidBodyComponent> or CharacterController)

type

TracedTypeThe enumeration type of the traced GameObject

matID

numberThe material of the traced surface.

userData

numberGeneric user data variable (NYI)

EventBodyData

Structure that holds event data of a given object.

Variables

linearVelocity

vec3The body’s linear velocity vector.

angularVelocity

vec3The body’s angular velocity vector (Controllers will never have an angular velocity)

position

vec3The body’s position in world space.

orientation

quatThe body’s orientation in world space.  (Controllers use an identity quaternion)

gameObject

GameObjectThe associated GameObject.

ContactData

Structure holding basic contact information between two objects.

Variables

closingVelocity

numberThe Scalar value of the closing velocity vector.

impulse

numberThe preventative interpenetration impulse being applied.

distance

numberThe distance between the two bodies.

normal

vec3The striking normal from BodyA to BodyB.

position

vec3The position of contact in world space.

ContactEventData

Contact Event data between 2 bodies and their shared contact.

Variables

bodyA

EventBodyDataBodyA’s data during this event callback.

bodyB

EventBodyDataBodyB’s data during this event callback.

contact

ContactDataThe contact point between BodyA and BodyB.

TriggerEventData

Trigger Event data between 2 bodies.

Variables

bodyA

EventBodyDataBodyA of the trigger (The trigger)

bodyB

EventBodyDataBodyB of the trigger event (The triggering body)

TracedObject

Structure that represents a traced object and the striking trace’s info.

Variables

distnace

floatdistance to trace.

normal

vec3starting position of the trace.

position

vec3direction of the trace.

object

GameObjectdistance to trace.

body

RigidbodyComponentstarting position of the trace.

type

EEngineTypedirection of the trace.

extra

numberbasic userdata field (Currently does nothing)

matID

numberArray of GameObjects to ignore during the trace.

TraceResult

Structure that holds an array of TracedObject

Variables

hasHits

numberTrue, has hits.  False, no hits.

numHits

numbernumber of tracer hits.

objects

array<TracedObject>Array of TracedObjects that were traced.

TracerInput

Structure that holds multiple inputs for a <PhysicsWorld.NKTraceWorld()> call.

Variables

distance

floatdistance to trace.

position

vec3starting position of the trace.

direction

vec3direction of the trace.

extra

numberbasic userdata field (Currently does nothing)

gameObjectIgnoreList

array<GameObject>Array of GameObjects to ignore during the trace.
Structure that represents a traced object and the striking trace’s info.
Basic unit of a scene.
Component representing a physics capsule and implementing standard character motion.
Close