This class is responsible for turning a 3D body's yaw angle in the direction that it's moving.
Such direction is approached gradually, unless it's specified that the direction should be set instantly.
Thanks to Godot 4.0 .NET thirdperson controllerby vaporvee for helping me figure out how to smoothly turn a 3D body in terms of a third-person controller.
More...
|
| BodyRotator (Node3D body=null) |
| Creates a new instance of BodyRotator
|
|
void | Update (double delta) |
| Method to be called every frame-process step in the scene tree in order to update body rotation.
|
|
|
Node3D | Body = null |
| The Node3D that this instance of BodyRotator is rotating.
|
|
float | Yaw = 0f |
| The yaw angle of the body that's being approached.
The body's yaw should eventually be the value of this variable, assuming that the yaw doesn't change by then and that this BodyRotator is still active.
|
|
float | Speed = 1f |
| How quickly the 3D body's yaw approaches Yaw. Higher values mean faster approach.
|
|
bool | TurnsInstantly = false |
| Whether or not the yaw of Body is instantly set to Yaw on rotation update.
|
|
bool | GradualTurnEnabled = true |
| Whether or not the body should gradually turn to the target yaw angle when TurnsInstantly is off.
|
|
This class is responsible for turning a 3D body's yaw angle in the direction that it's moving.
Such direction is approached gradually, unless it's specified that the direction should be set instantly.
Thanks to Godot 4.0 .NET thirdperson controller
by vaporvee for helping me figure out how to smoothly turn a 3D body in terms of a third-person controller.
◆ BodyRotator()
Jumpvalley.Players.Movement.BodyRotator.BodyRotator |
( |
Node3D | body = null | ) |
|
|
inline |
Creates a new instance of BodyRotator
- Parameters
-
body | The Node3D (representing the body) to rotate |
◆ Update()
void Jumpvalley.Players.Movement.BodyRotator.Update |
( |
double | delta | ) |
|
|
inline |
Method to be called every frame-process step in the scene tree in order to update body rotation.
- Parameters
-
The documentation for this class was generated from the following file: