Trade-offs and warnings
Consult the linked header for this operation’s ownership, lifetime and failure behavior.
EPOK RUNTIME
Method · 1 overload
Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.
Sets velocity as part of the world2d physics module.
void set_velocity(Fixed x, Fixed y)Sets velocity as part of the world2d physics module.
| Parameter | Type | Meaning |
|---|---|---|
x | Fixed | Not documented; consult the linked header. |
y | Fixed | Not documented; consult the linked header. |
Returns: Nothing (void).
#include "world2d_physics.hpp"
// Assume these named values have been initialized with valid data:
// Fixed x
// Fixed y
epok::RigidBody2DComponent& object = /* obtain a valid instance */;
object.set_velocity(x, y);Consult the linked header for this operation’s ownership, lifetime and failure behavior.
Declared in runtime/world2d_physics.hpp:61
apply_forceA force for the next simulation step only (call it every tick to keep pushing).Methodapply_impulsePerforms `apply impulse` as part of the world2d physics module.Methodclass_idPerforms `class id` as part of the world2d physics module.Methodget_angular_velocityReturns angular velocity as part of the world2d physics module.Methodget_impactReturns impact as part of the world2d physics module.Methodget_velocity_xReturns velocity x as part of the world2d physics module.Methodget_velocity_yReturns velocity y as part of the world2d physics module.Methodinverse_massInverse mass in Q12 per unit: 0 for a frozen (immovable) body.Methodis_frozenReports whether frozen as part of the world2d physics module.Methodis_sleepingReports whether sleeping as part of the world2d physics module.Methodis_touchingReports whether touching as part of the world2d physics module.Methodlevel_attachedPerforms `level attached` as part of the world2d physics module.Method