Difference between revisions of "HPL3/SOMA/Scripting/Scripting Api/Body"

From Frictional Wiki
< HPL3‎ | SOMA‎ | Scripting‎ | Scripting Api
Jump to navigation Jump to search
(Created page with "{{ScriptingStub}} Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki! ==Summary== {{CodeDocSummaryTop}} {{CodeDocSummaryIte...")
 
(No difference)

Latest revision as of 22:45, 24 August 2020

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

  • asBodyName (tString) — name of the body.
  • avForce (cVector3f) — force to add.
  • abLocalSpace (bool) — if the force is in the body's local space.

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

  • asBodyName (tString) — name of the body.
  • avImpulse (cVector3f) — impulse to add.
  • abLocalSpace (bool) — if the impulse is in the body's local space.

Returns:

  • void

Body_GetEntityName

tString Body_GetEntityName(const tString &in asBodyName)

Gets the name of the entity the body belongs to

Parameters

  • asBodyName (tString) — name of the body.

Returns:

  • 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) — name of the body.
  • abCollides (bool) — if it should collide or not.

Returns:

  • void