|
Trace Engine
A Raycaster Engine in C
|
#include "trc_world_position.h"Go to the source code of this file.
Data Structures | |
| struct | trc_transform_t |
Functions | |
| void | move_and_collide (trc_transform_t *transform, const trc_world_position_t velocity) |
| void | move_and_slide (trc_transform_t *transform, const trc_world_position_t velocity) |
| void | rotate_transform (trc_transform_t *transform, const float rotation_delta) |
| void move_and_collide | ( | trc_transform_t * | transform, |
| const trc_world_position_t | velocity | ||
| ) |
Moves the given transform in the specified direction, unless there is a wall within a distance equal to the transform's size
If that occurs, the transform will stop moving entirely
The velocity vector specifies both the direction and the speed of the transform
| void move_and_slide | ( | trc_transform_t * | transform, |
| const trc_world_position_t | velocity | ||
| ) |
Moves the given transform in the specified direction, unless there is a wall within a distance equal to the transform's size
If that occurs, the transform will slide across the wall (losing velocity according with the collision angle)
The velocity vector specifies both the direction and the speed of the transform
| void rotate_transform | ( | trc_transform_t * | transform, |
| const float | rotation_delta | ||
| ) |
Rotates the transform direction in the given signed angle