Entity AddImpulse

From CryWiki

Jump to: navigation, search

entity:AddImpulse(number, vec3, vec3, number, number)

Description

Adds an impulse to the entity. (Physics)

Arguments

  1. Part id (if none, use -1)
  2. Position of the impulse
  3. Direction of the impulse
  4. Impulse strength
  5. ???


Example

Lua (example)
-- this pushes the player up with a strength of 5000
g_localActor:AddImpulse(-1, g_localActor:GetCenterOfMassPos(), {x=0, y=0, z=1}, 5000, 1);


Personal tools