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 components module.
void set_velocity(Fixed x, Fixed y)Sets velocity as part of the world2d components 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_components.hpp"
// Assume these named values have been initialized with valid data:
// Fixed x
// Fixed y
epok::CharacterBody2DComponent& 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_components.hpp:434
class_idPerforms `class id` as part of the world2d components module.Methodis_on_ceilingReports whether on ceiling as part of the world2d components module.Methodis_on_floorReports whether on floor as part of the world2d components module.Methodis_on_wallReports whether on wall as part of the world2d components module.Methodlast_collision_actorPerforms `last collision actor` as part of the world2d components module.Methodlast_collision_is_tileWhether the last collision was a tile of a TileMapLayer (last_collision_actor is its actor).Methodlast_motion_xPerforms `last motion x` as part of the world2d components module.Methodlast_motion_yPerforms `last motion y` as part of the world2d components module.Methodlast_tile_xCell column / row of that tile.Methodlast_tile_yPerforms `last tile y` as part of the world2d components module.Methodlevel_attachedPerforms `level attached` as part of the world2d components module.Methodmove_and_collideMoves by an explicit displacement (pixels) and stops at the first obstacle.Method