TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.TopDownEngine.Door3D Class Reference

A class to handle the 3D doors in the Loft demo. More...

Inheritance diagram for MoreMountains.TopDownEngine.Door3D:
MoreMountains.TopDownEngine.TopDownMonoBehaviour MoreMountains.Tools.MMMonoBehaviour

Public Attributes

float MinAngle = 90f
 the min angle the door can open at
float MaxAngle = 270f
 the max angle the door can open at
float MinAngleLock = 90f
 the min angle at which the door locks when open
float MaxAngleLock = 270f
 the max angle at which the door locks when open
float SafeLockDuration = 1f
 the duration of the "safe lock", a period during which the door is set to kinematic, to prevent glitches. That period ends after that safe lock duration, once the player has exited the door's area
Rigidbody Door
 the rigidbody associated to this door

Protected Member Functions

virtual void Start ()
 On start we compute our initial direction and rotation.
virtual void Update ()
 On Update we we lock the door if needed.
virtual void OnTriggerStay (Collider collider)
 While we're colliding with something, we store the timestamp for future use.

Protected Attributes

Vector3 _eulerAngles
Vector3 _initialPosition
Vector2 _initialDirection
Vector2 _currentDirection
float _lastContactTimestamp
Vector3 _minAngleRotation
Vector3 _maxAngleRotation

Detailed Description

A class to handle the 3D doors in the Loft demo.

Member Function Documentation

◆ OnTriggerStay()

virtual void MoreMountains.TopDownEngine.Door3D.OnTriggerStay ( Collider collider)
protectedvirtual

While we're colliding with something, we store the timestamp for future use.

Parameters
collider

◆ Start()

virtual void MoreMountains.TopDownEngine.Door3D.Start ( )
protectedvirtual

On start we compute our initial direction and rotation.

◆ Update()

virtual void MoreMountains.TopDownEngine.Door3D.Update ( )
protectedvirtual

On Update we we lock the door if needed.

Member Data Documentation

◆ _currentDirection

Vector2 MoreMountains.TopDownEngine.Door3D._currentDirection
protected

◆ _eulerAngles

Vector3 MoreMountains.TopDownEngine.Door3D._eulerAngles
protected

◆ _initialDirection

Vector2 MoreMountains.TopDownEngine.Door3D._initialDirection
protected

◆ _initialPosition

Vector3 MoreMountains.TopDownEngine.Door3D._initialPosition
protected

◆ _lastContactTimestamp

float MoreMountains.TopDownEngine.Door3D._lastContactTimestamp
protected

◆ _maxAngleRotation

Vector3 MoreMountains.TopDownEngine.Door3D._maxAngleRotation
protected

◆ _minAngleRotation

Vector3 MoreMountains.TopDownEngine.Door3D._minAngleRotation
protected

◆ Door

Rigidbody MoreMountains.TopDownEngine.Door3D.Door

the rigidbody associated to this door

◆ MaxAngle

float MoreMountains.TopDownEngine.Door3D.MaxAngle = 270f

the max angle the door can open at

◆ MaxAngleLock

float MoreMountains.TopDownEngine.Door3D.MaxAngleLock = 270f

the max angle at which the door locks when open

◆ MinAngle

float MoreMountains.TopDownEngine.Door3D.MinAngle = 90f

the min angle the door can open at

◆ MinAngleLock

float MoreMountains.TopDownEngine.Door3D.MinAngleLock = 90f

the min angle at which the door locks when open

◆ SafeLockDuration

float MoreMountains.TopDownEngine.Door3D.SafeLockDuration = 1f

the duration of the "safe lock", a period during which the door is set to kinematic, to prevent glitches. That period ends after that safe lock duration, once the player has exited the door's area


The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Demos/Loft3D/Scripts/Door3D.cs