Table Of Contents

Previous topic

motion

Next topic

motion.Collision

This Page

motion.Acceleration

Constructor

class motion.Acceleration(presence, accelFn, period)

Bases: motion.Motion()

Arguments:
  • presence (presence) – The presence to control
  • accelFn (function(presence)->(util.Vec3|undefined)) – (optional =get from presence.accel field) A function that should return the acceleration on a presence at any point in time. If accelFn returns undefined (“return;”), the acceleration will be unchanged from the last call. If accelFn itself is undefined (or not provided), the controller will use the value of presence.accel.
  • period (number) – (optional =defaultPeriod) The period at which the acceleration is updated