Jumpvalley 0.5.0
An app and library that can be used to test and run 3D platformer levels. Currently being made with Godot.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Jumpvalley.Players.Movement.BodyRotator Class Reference

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...

Public Member Functions

 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.
 

Public Attributes

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BodyRotator()

Jumpvalley.Players.Movement.BodyRotator.BodyRotator ( Node3D body = null)
inline

Creates a new instance of BodyRotator

Parameters
bodyThe Node3D (representing the body) to rotate

Member Function Documentation

◆ 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
delta

The documentation for this class was generated from the following file: