Feel  4.3
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMPositionRecorder Class Reference

Add this class on a Transform, and it'll record its position periodically The Positions array can then be read from anywhere to know where that object was in the past More...

Inheritance diagram for MoreMountains.Tools.MMPositionRecorder:

Public Types

enum  Modes { Modes.Framecount, Modes.Time }
 the possible modes to run this recorder on More...
 

Public Attributes

int NumberOfPositionsToRecord = 100
 the amount of positions to record More...
 
Modes Mode = Modes.Framecount
 whether to record every X frames, or every X seconds More...
 
int FrameInterval = 0
 the amount of frames to wait for between two recordings More...
 
float TimeInterval = 0.02f
 the duration (in seconds) between two recordings More...
 
bool RecordOnTimescaleZero = false
 whether or not to record if the timescale is 0 More...
 
Vector3[] Positions
 the array of positions (0 most recent, higher less recent) More...
 
int FrameCounter
 the current frame counter More...
 

Protected Member Functions

virtual void Awake ()
 On Awake, we initialize our array of positions More...
 
virtual void Update ()
 On Update we store our positions More...
 
virtual void StorePositions ()
 Stores the position in the array and offsets it More...
 

Protected Attributes

int _frameCountLastRecord = 0
 
float _timeLastRecord = 0f
 

Detailed Description

Add this class on a Transform, and it'll record its position periodically The Positions array can then be read from anywhere to know where that object was in the past

Member Enumeration Documentation

◆ Modes

the possible modes to run this recorder on

Enumerator
Framecount 
Time 

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMPositionRecorder.Awake ( )
protectedvirtual

On Awake, we initialize our array of positions

◆ StorePositions()

virtual void MoreMountains.Tools.MMPositionRecorder.StorePositions ( )
protectedvirtual

Stores the position in the array and offsets it

◆ Update()

virtual void MoreMountains.Tools.MMPositionRecorder.Update ( )
protectedvirtual

On Update we store our positions

Member Data Documentation

◆ _frameCountLastRecord

int MoreMountains.Tools.MMPositionRecorder._frameCountLastRecord = 0
protected

◆ _timeLastRecord

float MoreMountains.Tools.MMPositionRecorder._timeLastRecord = 0f
protected

◆ FrameCounter

int MoreMountains.Tools.MMPositionRecorder.FrameCounter

the current frame counter

◆ FrameInterval

int MoreMountains.Tools.MMPositionRecorder.FrameInterval = 0

the amount of frames to wait for between two recordings

◆ Mode

Modes MoreMountains.Tools.MMPositionRecorder.Mode = Modes.Framecount

whether to record every X frames, or every X seconds

◆ NumberOfPositionsToRecord

int MoreMountains.Tools.MMPositionRecorder.NumberOfPositionsToRecord = 100

the amount of positions to record

◆ Positions

Vector3 [] MoreMountains.Tools.MMPositionRecorder.Positions

the array of positions (0 most recent, higher less recent)

◆ RecordOnTimescaleZero

bool MoreMountains.Tools.MMPositionRecorder.RecordOnTimescaleZero = false

whether or not to record if the timescale is 0

◆ TimeInterval

float MoreMountains.Tools.MMPositionRecorder.TimeInterval = 0.02f

the duration (in seconds) between two recordings


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