Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.SwimDirectionRotator Class Reference

A little class to rotate towars the direction of swim. More...

Inheritance diagram for PlatformerPro.SwimDirectionRotator:

Public Attributes

float rotationSpeed
 Speed we rotate at for air movement. More...
 
bool rotateOnSurface
 If on the surface of water should we still rotate? More...
 
bool snapImmediately = true
 Speed we rotate at when resetting back to 0. More...
 
Vector3 rotationPoint
 point we rotate around. More...
 

Protected Member Functions

void SetTargetRotation ()
 
void RotateTowardsTarget ()
 Rotates towrds target rotation. More...
 

Protected Attributes

IMob character
 Cached reference to character. More...
 
float targetRotation
 Desired rotation. More...
 

Detailed Description

A little class to rotate towars the direction of swim.

Member Function Documentation

◆ RotateTowardsTarget()

void PlatformerPro.SwimDirectionRotator.RotateTowardsTarget ( )
protected

Rotates towrds target rotation.

◆ SetTargetRotation()

void PlatformerPro.SwimDirectionRotator.SetTargetRotation ( )
protected

Member Data Documentation

◆ character

IMob PlatformerPro.SwimDirectionRotator.character
protected

Cached reference to character.

◆ rotateOnSurface

bool PlatformerPro.SwimDirectionRotator.rotateOnSurface

If on the surface of water should we still rotate?

◆ rotationPoint

Vector3 PlatformerPro.SwimDirectionRotator.rotationPoint

point we rotate around.

◆ rotationSpeed

float PlatformerPro.SwimDirectionRotator.rotationSpeed

Speed we rotate at for air movement.

◆ snapImmediately

bool PlatformerPro.SwimDirectionRotator.snapImmediately = true

Speed we rotate at when resetting back to 0.

◆ targetRotation

float PlatformerPro.SwimDirectionRotator.targetRotation
protected

Desired rotation.


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