|
| void | applyImpulse (Registry ®istry, entt::entity entity, glm::vec3 impulse) noexcept |
| | Apply an instantaneous impulse (units: kg·m/s) at the entity's centre-of-mass.
|
| void | applyForce (Registry ®istry, entt::entity entity, glm::vec3 force) noexcept |
| | Apply a continuous force (units: kg·m/s²) at the entity's centre.
|
| void | applyImpulseAtPoint (Registry ®istry, entt::entity entity, glm::vec3 impulse, glm::vec3 worldPoint) noexcept |
| | Apply an off-centre impulse.
|
| void | applyForceAtPoint (Registry ®istry, entt::entity entity, glm::vec3 force, glm::vec3 worldPoint) noexcept |
| | Apply an off-centre continuous force.
|
| void | applyTorque (Registry ®istry, entt::entity entity, glm::vec3 torque) noexcept |
| | Apply a torque (Phase 7). No-op for entities without a RigidBody.
|
| void | integrateAccumulators (Registry ®istry, float dt) noexcept |
| | Drain every entity's force / impulse accumulators into its velocity (and, in Phase 7, angular velocity).
|
| void physics::forces::applyImpulse |
( |
Registry & | registry, |
|
|
entt::entity | entity, |
|
|
glm::vec3 | impulse ) |
|
noexcept |
Apply an instantaneous impulse (units: kg·m/s) at the entity's centre-of-mass.
No torque component.
If the entity has RigidBody, the impulse accumulates into impulseAccum and is integrated as velocity += J * invMass at tick start. Otherwise, falls back to velocity += impulse directly.
Thread-safe iff the same entity is not modified from multiple threads in the same tick.