Both sides previous revision Previous revision Next revision | Previous revision | ||
hpl3:community:hpl3_reference_guide [2016/10/06 18:56] abion47 |
hpl3:community:hpl3_reference_guide [2016/10/06 19:17] (current) abion47 [Key Pick-Up] |
||
---|---|---|---|
Line 32: | Line 32: | ||
* [[hpl3/game/scripting/function_reference/hps_api#entity_addimpulsefromentity|Entity_AddImpulseFromEntity]] | * [[hpl3/game/scripting/function_reference/hps_api#entity_addimpulsefromentity|Entity_AddImpulseFromEntity]] | ||
- | The names of the functions offer a straightforward explanation of what the functions do. The Entity_AddForce and Entity_AddImpulse functions enable you to apply force/impulse on an entity with a direction and magnitude specified by a given cVector3f parameter. The Entity_AddForceFromEntity and Entity_AddImpulseFromEntity functions enable you to add force/impulse on an entity originating from the position of another entity with a magnitude specified by a given float parameter. All four functions support wildsards (*) for affecting multiple entities with a single function call. | + | The names of the functions offer a straightforward explanation of what the functions do: |
+ | |||
+ | The **Entity_AddForce** and **Entity_AddImpulse** functions enable you to apply force/impulse on an entity with a direction and magnitude specified by a given [[hpl3/community/scripting/classes/cvector3f|cVector3f]] parameter. | ||
+ | |||
+ | The **Entity_AddForceFromEntity** and **Entity_AddImpulseFromEntity** functions enable you to add force/impulse on an entity originating from the position of another entity with a magnitude specified by a given **float** parameter. | ||
+ | |||
+ | All four functions support wildsards (*) for affecting multiple entities with a single function call. | ||
Usage example: | Usage example: | ||
Line 61: | Line 67: | ||
* **AddImpulseAtPosition** (const cVector3f &in avImpulse, const cVector3f &in avPos) | * **AddImpulseAtPosition** (const cVector3f &in avImpulse, const cVector3f &in avPos) | ||
- | These functions behave similarly to their convenience function counterparts, with AddForceAtPosition and AddImpulseAtPosition applying their effects from an arbitrary point in the world rather than the position of another entity. | + | These functions behave similarly to their convenience function counterparts, with **AddForceAtPosition** and **AddImpulseAtPosition** applying their effects from an arbitrary point in the world rather than the position of another entity. |
Usage example: | Usage example: |