Panda3D
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ControlManager Class Reference

Public Member Functions

def __init__ (self, enable=True, passMessagesThrough=False)
 
def __str__ (self)
 
def add (self, controls, name="basic")
 
def collisionsOff (self)
 
def collisionsOn (self)
 
def delete (self)
 
def deleteCollisions (self)
 
def disable (self)
 
def disableAvatarJump (self)
 
def enable (self)
 
def enableAvatarJump (self)
 
def get (self, name)
 
def getIsAirborne (self)
 
def getSpeeds (self)
 
def lockControls (self)
 
def monitor (self, foo)
 
def placeOnFloor (self)
 
def remove (self, name)
 
def setSpeeds (self, forwardSpeed, jumpForce, reverseSpeed, rotateSpeed, strafeLeft=0, strafeRight=0)
 
def setTag (self, key, value)
 
def setWASDTurn (self, turn)
 
def stop (self)
 
def unlockControls (self)
 
def use (self, name, avatar)
 

Public Attributes

 controls
 
 currentControls
 
 currentControlsName
 
 forceAvJumpToken
 
 ignoreUse
 
 inputStateTokens
 
 isEnabled
 
 passMessagesThrough
 
 WASDTurnTokens
 

Static Public Attributes

 notify = DirectNotifyGlobal.directNotify.newCategory("ControlManager")
 
 wantWASD = ConfigVariableBool('want-WASD', False)
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  enable = True,
  passMessagesThrough = False 
)

Member Function Documentation

◆ __str__()

def __str__ (   self)

◆ add()

def add (   self,
  controls,
  name = "basic" 
)
controls is an avatar control system.
name is any key that you want to use to refer to the
    the controls later (e.g. using the use(<name>) call).

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

See also: use().

◆ collisionsOff()

def collisionsOff (   self)

◆ collisionsOn()

def collisionsOn (   self)

◆ delete()

def delete (   self)

◆ deleteCollisions()

def deleteCollisions (   self)

◆ disable()

def disable (   self)

◆ disableAvatarJump()

def disableAvatarJump (   self)
prevent

◆ enable()

def enable (   self)

◆ enableAvatarJump()

def enableAvatarJump (   self)
Stop forcing the ctrl key to return 0's

◆ get()

def get (   self,
  name 
)

◆ getIsAirborne()

def getIsAirborne (   self)

◆ getSpeeds()

def getSpeeds (   self)

◆ lockControls()

def lockControls (   self)

◆ monitor()

def monitor (   self,
  foo 
)

◆ placeOnFloor()

def placeOnFloor (   self)

◆ remove()

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

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

See also: add().

◆ setSpeeds()

def setSpeeds (   self,
  forwardSpeed,
  jumpForce,
  reverseSpeed,
  rotateSpeed,
  strafeLeft = 0,
  strafeRight = 0 
)

◆ setTag()

def setTag (   self,
  key,
  value 
)

◆ setWASDTurn()

def setWASDTurn (   self,
  turn 
)

◆ stop()

def stop (   self)

◆ unlockControls()

def unlockControls (   self)

◆ use()

def use (   self,
  name,
  avatar 
)
name is a key (string) that was previously passed to add().

Use a previously added control system.

See also: add().

Member Data Documentation

◆ controls

controls

◆ currentControls

currentControls

◆ currentControlsName

currentControlsName

◆ forceAvJumpToken

forceAvJumpToken

◆ ignoreUse

ignoreUse

◆ inputStateTokens

inputStateTokens

◆ isEnabled

isEnabled

◆ notify

notify = DirectNotifyGlobal.directNotify.newCategory("ControlManager")
static

◆ passMessagesThrough

passMessagesThrough

◆ wantWASD

wantWASD = ConfigVariableBool('want-WASD', False)
static

◆ WASDTurnTokens

WASDTurnTokens