Class motion.Velocity
Extends
motion.Motion.
A controller for manipulating the velocity of a presence.
Defined in: motion.em.
Constructor Attributes | Constructor Name and Description |
---|---|
motion.Velocity(presence, velFn, period)
|
- Fields borrowed from class motion.Motion:
- presence
- Methods borrowed from class motion.Motion:
- isSuspended, reset, suspend
Class Detail
motion.Velocity(presence, velFn, period)
- Parameters:
- {presence} presence
- The presence to control
- {function(presence)->(util.Vec3|undefined)} velFn
- A function that should return the new velocity of the presence at any point in time (just return; to leave velocity unchanged)
- {number} period
- (optional =defaultPeriod) The period at which the presence's velocity is updated