MotionChecker

Properties

  • previousTransform (dynamic)
  • movedLastFrame (boolean)

Constructor

new MotionChecker(): MotionChecker

Instance Methods

check( position?: BGE.Math.Vector, rotation?: BGE.Math.Vector, scale?: BGE.Math.Vector, ): boolean

Is the current transform as given different from the previous?

Parameters

  • position (BGE.Math.Vector, optional, default: "invalid")
  • rotation (BGE.Math.Vector, optional, default: "invalid")
  • scale (BGE.Math.Vector, optional, default: "invalid")

Returns

  • boolean — True if different from previous

resetMovedFlag(): void

Returns

  • void

setTransform( position: BGE.Math.Vector, rotation: BGE.Math.Vector, scale?: BGE.Math.Vector, ): void

Parameters

  • position (BGE.Math.Vector)
  • rotation (BGE.Math.Vector)
  • scale (BGE.Math.Vector, optional, default: "invalid")

Returns

  • void

getPositionDifference( currentPosition: BGE.Math.Vector, ): BGE.Math.Vector

Parameters

  • currentPosition (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

getRotationDifference( currentRotation: BGE.Math.Vector, ): BGE.Math.Vector

Parameters

  • currentRotation (BGE.Math.Vector)

Returns

  • BGE.Math.Vector