Panda3D
Public Member Functions | Public Attributes | Static Public Attributes

PhysicsWalker Class Reference

List of all members.

Public Member Functions

def __init__
def addBlastForce
def avatarPhysicsIndicator
def debugPrint
def deleteCollisions
def determineHeight
def disableAvatarControls
def displayDebugInfo
def doDeltaPos
def enableAvatarControls
def flushEventHandlers
def getCollisionsActive
def getSpeeds
def getVelocity
def handleAvatarControls
def initializeCollisions
def oneTimeCollide
def placeOnFloor
def reset
def setAirborneHeightFunc
def setAvatar
def setAvatarPhysicsIndicator
def setCollisionsActive
def setPriorParentVector
def setupAvatarPhysicsIndicator
def setupPhysics
def setupRay
def setupSphere
def setWalkSpeed

Public Attributes

 acForce
 actorNode
 avatar
 avatarControlForwardSpeed
 avatarControlJumpForce
 avatarControlReverseSpeed
 avatarControlRotateSpeed
 avatarNodePath
 avatarRadius
 avatarViscosity
 collisionsActive
 cRay
 cRayBitMask
 cRayNodePath
 cRayQueue
 cSphere
 cSphereBitMask
 cSphereNodePath
 cTrav
 floorOffset
 getAirborneHeight
 gravity
 highMark
 isAirborne
 lifter
 needToDeltaPos
 phys
 physContactIndicator
 physVelocityIndicator
 priorParent
 priorParentNp
 pusher

Static Public Attributes

tuple notify = DirectNotifyGlobal.directNotify.newCategory("PhysicsWalker")
int useHeightRay = 0
int useLifter = 0
tuple wantAvatarPhysicsIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)
tuple wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)

Constructor & Destructor Documentation

def __init__ (   self,
  gravity = -32.1740,
  standableGround = 0.707,
  hardLandingForce = 16.0 
)

Member Function Documentation

def addBlastForce (   self,
  vector 
)
def avatarPhysicsIndicator (   self,
  task 
)
def debugPrint (   self,
  message 
)
for debugging
def deleteCollisions (   self)
def determineHeight (   self)
returns the height of the avatar above the ground.
If there is no floor below the avatar, 0.0 is returned.
aka get airborne height.
def disableAvatarControls (   self)
Ignore the arrow keys, etc.
def displayDebugInfo (   self)
For debug use.
def doDeltaPos (   self)
def enableAvatarControls (   self)
Activate the arrow keys, etc.
def flushEventHandlers (   self)
def getCollisionsActive (   self)
def getSpeeds (   self)
def getVelocity (   self)
def handleAvatarControls (   self,
  task 
)
Check on the arrow keys and update the avatar.
def initializeCollisions (   self,
  collisionTraverser,
  avatarNodePath,
  wallBitmask,
  floorBitmask,
  avatarRadius = 1.4,
  floorOffset = 1.0,
  reach = 1.0 
)
Set up the avatar collisions
def oneTimeCollide (   self)
Makes one quick collision pass for the avatar, for instance as
a one-time straighten-things-up operation after collisions
have been disabled.
def placeOnFloor (   self)
Make a reasonable effort to place the avatar on the ground.
For example, this is useful when switching away from the
current walker.
def reset (   self)
def setAirborneHeightFunc (   self,
  getAirborneHeight 
)
def setAvatar (   self,
  avatar 
)
def setAvatarPhysicsIndicator (   self,
  indicator 
)
indicator is a NodePath
def setCollisionsActive (   self,
  active = 1 
)
def setPriorParentVector (   self)
def setupAvatarPhysicsIndicator (   self)
def setupPhysics (   self,
  avatarNodePath 
)
def setupRay (   self,
  floorBitmask,
  floorOffset 
)
def setupSphere (   self,
  bitmask,
  avatarRadius 
)
Set up the collision sphere
def setWalkSpeed (   self,
  forward,
  jump,
  reverse,
  rotate 
)

Member Data Documentation

tuple notify = DirectNotifyGlobal.directNotify.newCategory("PhysicsWalker") [static]
int useHeightRay = 0 [static]
int useLifter = 0 [static]
tuple wantAvatarPhysicsIndicator = base.config.GetBool('want-avatar-physics-indicator', 0) [static]
tuple wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0) [static]
 All Classes Namespaces Functions Variables Properties