direct.controls.NonPhysicsWalker

from direct.controls.NonPhysicsWalker import NonPhysicsWalker

NonPhysicsWalker.py is for avatars.

A walker control such as this one provides:

  • creation of the collision nodes

  • handling the keyboard and mouse input for avatar movement

  • moving the avatar

it does not:

  • play sounds

  • play animations

although it does send messages that allow a listener to play sounds or animations based on walker events.

Inheritance diagram

Inheritance diagram of direct.controls.NonPhysicsWalker

class NonPhysicsWalker[source]

Bases: DirectObject

__init__()[source]
addBlastForce(vector)[source]
debugPrint(message)[source]

for debugging

deleteCollisions()[source]
disableAvatarControls()[source]

Ignore the arrow keys, etc.

displayDebugInfo()[source]

For debug use.

doDeltaPos()[source]
enableAvatarControls()[source]

Activate the arrow keys, etc.

flushEventHandlers()[source]
getSpeeds()[source]
getVelocity()[source]
handleAvatarControls(task)[source]

Check on the arrow keys and update the avatar.

initializeCollisions(collisionTraverser, avatarNodePath, avatarRadius=1.4, floorOffset=1.0, reach=1.0)[source]

Set up the avatar for collisions

notify = <direct.directnotify.Notifier.Notifier object>
oneTimeCollide()[source]

Makes one quick collision pass for the avatar, for instance as a one-time straighten-things-up operation after collisions have been disabled.

placeOnFloor()[source]

Make a reasonable effor to place the avatar on the ground. For example, this is useful when switching away from the current walker.

reset()[source]
setAirborneHeightFunc(getAirborneHeight)[source]
setAvatar(avatar)[source]
setCollisionsActive(active=1)[source]
setFloorBitMask(bitMask)[source]
setTag(key, value)[source]
setWalkSpeed(forward, jump, reverse, rotate)[source]
setWallBitMask(bitMask)[source]
slideName = 'slide-is-disabled'
swapFloorBitMask(oldMask, newMask)[source]
wantDebugIndicator = 0