Table Of Contents

Previous topic

motion.util

Next topic

std.movement

This Page

motion.Velocity

Constructor

class motion.Velocity(presence, velFn, period)

Bases: motion.Motion()

Arguments:
  • presence (presence) – The presence to control
  • velFn (function(presence)->(util.Vec3|undefined)) – A function that should return the new velocity of the presence at any point in time (just return; to leave velocity unchanged)
  • period (number) – (optional =defaultPeriod) The period at which the presence’s velocity is updated