HPL3/Amnesia: Rebirth/Scripting/Scripting Api/Body

From Frictional Wiki
Jump to navigation Jump to search

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Summary

Return Type Function and Description
void Body_AddForce(const tString &in asBodyName, const cVector3f &in avForce, bool abLocalSpace)
Adds force to the specified body
void Body_AddImpulse(const tString &in asBodyName, const cVector3f &in avImpulse, bool abLocalSpace)
Adds an impulse to the specified body
tString Body_GetEntityName(const tString &in asBodyName)
Gets the name of the entity the body belongs to
void Body_SetCollides(const tString &in asBodyName, bool abCollides)
Sets whether a body collides with other bodies or not

Function Detail

Body_AddForce

void Body_AddForce(const tString &in asBodyName,
                   const cVector3f &in avForce,
                   bool abLocalSpace)

Adds force to the specified body.

Parameters

Returns:

  • void

Body_AddImpulse

void Body_AddImpulse(const tString &in asBodyName,
                     const cVector3f &in avImpulse,
                     bool abLocalSpace)

Adds an impulse to the specified body.

Parameters

Returns:

  • void

Body_GetEntityName

tString Body_GetEntityName(const tString &in asBodyName)

Gets the name of the entity the body belongs to

Parameters

Returns:

  • tString—tString, Name of the entity.

Body_SetCollides

void Body_SetCollides(const tString &in asBodyName,
                      bool abCollides)

Sets whether a body collides with other bodies or not.

Parameters

  • asBodyName (tString) —
  • abCollides (bool) —

Returns:

  • void