Functions used to make the player playable (no-clipping).
More...
|
| void | solve_collision_x (t_data *data, float x_vel) |
| | Solver of collision on x axis.
|
| |
| void | solve_collision_y (t_data *data, float y_vel) |
| | Solver of collision on y axis.
|
| |
| void | resolve_collision_steps (t_data *data, float vel_x, float vel_y) |
| | Solver of collision on x and y using steps smaller than 1 unit, To use only when moving faster than 1 unit, when MOVEMENT_SPEED_FWD_BWD >= 1.0f or MOVEMENT_SPEED_LEFT_RIGHT >= 1.0f.
|
| |
Functions used to make the player playable (no-clipping).
◆ resolve_collision_steps()
| void resolve_collision_steps |
( |
t_data * | data, |
|
|
float | vel_x, |
|
|
float | vel_y ) |
Solver of collision on x and y using steps smaller than 1 unit, To use only when moving faster than 1 unit, when MOVEMENT_SPEED_FWD_BWD >= 1.0f or MOVEMENT_SPEED_LEFT_RIGHT >= 1.0f.
- Parameters
-
| [in,out] | data | data structure |
| [in] | vel_x | velocity on x axis |
| [in] | vel_y | velocity on y axis |
◆ solve_collision_x()
| void solve_collision_x |
( |
t_data * | data, |
|
|
float | x_vel ) |
Solver of collision on x axis.
- Parameters
-
| [in,out] | data | data structure |
| [in] | x_vel | velocity on x axis |
◆ solve_collision_y()
| void solve_collision_y |
( |
t_data * | data, |
|
|
float | y_vel ) |
Solver of collision on y axis.
- Parameters
-
| [in,out] | data | data structure |
| [in] | y_vel | velocity on y axis |