Class motion.Position
Extends
motion.Motion.
A controller for manipulating the position of a presence directly.
Note that if this is used for constant updates, the position changes will
appear abrupt and jittery -- this type of controller is best used for
sudden, infrequent changes (such as teleportation).
Defined in: motion.em.
Constructor Attributes | Constructor Name and Description |
---|---|
motion.Position(presence, posFn, period)
|
- Fields borrowed from class motion.Motion:
- presence
- Methods borrowed from class motion.Motion:
- isSuspended, reset, suspend
Class Detail
motion.Position(presence, posFn, period)
- Parameters:
- {presence} presence
- The presence to control
- {function(presence)->(util.Vec3|undefined)} posFn
- A function that should return the new position of the presence at any point in time (just return; to leave position unchanged)
- {number} period
- (optional =defaultPeriod) The period at which the presence's position is updated