DIFF

class ObjectSnapCallbackSource

EntityPlacementCallback ObjectSnapCallback

Members 8

Object m_Owner

The owner performing the snap callback

vector m_OwnerPosition

The position of the owner in world space

vector m_OwnerDirection

The direction of the owner in world space

vector m_Offset

The true center of the bounding box of the object to be dropped in model space

vector m_Extents

The size of the boundig box, centered

vector m_DirectionFunc

How much should the direction be favoured.

bool m_DebugEnabled

If 'OnDebug' is to be called

vector m_Transform[4]

The transformation currently being debugged

Methods 5

void OnSetup()

Initialization of script variables

void OnDebug(vector p0, vector p1, bool hasHit, bool found)

Debug callback for rendering on the screen

bool OnFirstContact(Object other)

Called for first layer contacts to determine if this object should be snapped around or default rv raycast placement is fine

Returns: True if bounding snap is to be used

bool OnQuery(Object other)

Initial query around the owner position to see if an object should be processed in contact testing

Returns: True if the object should be counted

bool OnCollide(Object other)

Ray cast line test from owner to a tested position

Returns: True if the line test should be broken and make the transformation invalid