direct.controls.ControlManager

from direct.controls.ControlManager import ControlManager

Inheritance diagram

Inheritance diagram of direct.controls.ControlManager

class ControlManager(enable=True, passMessagesThrough=False)[source]

Bases: object

__init__(enable=True, passMessagesThrough=False)[source]
add(controls, name='basic')[source]

Add a control instance to the list of available control systems.

Parameters:
  • controls – an avatar control system.

  • name (str) – any key that you want to use to refer to the controls later (e.g. using the use(<name>) call).

See also: use().

collisionsOff()[source]
collisionsOn()[source]
delete()[source]
deleteCollisions()[source]
disable()[source]
disableAvatarJump()[source]

prevent

enable()[source]
enableAvatarJump()[source]

Stop forcing the ctrl key to return 0’s

get(name)[source]
getIsAirborne()[source]
getSpeeds()[source]
lockControls()[source]
monitor(_)[source]
notify = <direct.directnotify.Notifier.Notifier object>
placeOnFloor()[source]
remove(name)[source]

Remove a control instance from the list of available control systems.

Parameters:

name – any key that was used to refer to the controls when they were added (e.g. using the add(<controls>, <name>) call).

See also: add().

setSpeeds(forwardSpeed, jumpForce, reverseSpeed, rotateSpeed, strafeLeft=0, strafeRight=0)[source]
setTag(key, value)[source]
setWASDTurn(turn)[source]
stop()[source]
unlockControls()[source]
use(name, avatar)[source]

name is a key (string) that was previously passed to add().

Use a previously added control system.

See also: add().

wantWASD = 0