-
Автор темы
- #1
The autoalign is called every time the player's character moves, and it checks if the player is pressing any of the movement keys (W, A, S, or D). If any of these keys are being pressed, the function calculates the direction in which the player's character should move, based on the player's view angle, and then traces a ray in that direction. If the ray collides with a solid surface, the function calculates the angle at which the player's character should align with the surface and applies that angle to the player's view :husled: