Panda3D
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
GravityWalker Class Reference
Inheritance diagram for GravityWalker:
BattleWalker TwoDWalker

Public Member Functions

def __init__
 
def addBlastForce
 
def debugPrint
 
def deleteCollisions
 
def disableAvatarControls
 
def displayDebugInfo
 
def doDeltaPos
 
def enableAvatarControls
 
def flushEventHandlers
 
def getAirborneHeight
 
def getCollisionsActive
 
def getGravity
 
def getIsAirborne
 
def getSpeeds
 
def getVelocity
 
def handleAvatarControls
 
def initializeCollisions
 
def oneTimeCollide
 
def placeOnFloor
 
def reset
 
def setAirborneHeightFunc
 
def setAvatar
 
def setAvatarPhysicsIndicator
 
def setCollisionRayHeight
 
def setCollisionsActive
 
def setFloorBitMask
 
def setGravity
 
def setMayJump
 
def setPriorParentVector
 
def setTag
 
def setupEventSphere
 
def setupFloorSphere
 
def setupRay
 
def setupWallSphere
 
def setWalkSpeed
 
def setWallBitMask
 
def startJumpDelay
 
def swapFloorBitMask
 

Public Attributes

 avatar
 
 avatarControlForwardSpeed
 
 avatarControlJumpForce
 
 avatarControlReverseSpeed
 
 avatarControlRotateSpeed
 
 avatarNodePath
 
 avatarRadius
 
 cEventSphereNodePath
 
 cFloorSphereNodePath
 
 collisionsActive
 
 controlsTask
 
 cRay
 
 cRayNodePath
 
 cTrav
 
 cWallSphereNodePath
 
 event
 
 falling
 
 floorBitmask
 
 getAirborneHeight
 
 highMark
 
 indicatorTask
 
 isAirborne
 
 jumpDelayTask
 
 lifter
 
 mayJump
 
 moving
 
 needToDeltaPos
 
 physVelocityIndicator
 
 priorParent
 
 pusher
 
 pusherFloorhandler
 
 rotationSpeed
 
 slideSpeed
 
 speed
 
 vel
 
 wallBitmask
 

Static Public Attributes

tuple DiagonalFactor = math.sqrt(2.)
 
tuple earlyEventSphere = base.config.GetBool('early-event-sphere', 0)
 
tuple notify = directNotify.newCategory("GravityWalker")
 
tuple wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)
 
tuple wantFloorSphere = base.config.GetBool('want-floor-sphere', 0)
 

Constructor & Destructor Documentation

def __init__ (   self,
  gravity = 64.348,
  standableGround = 0.707,
  hardLandingForce = 16.0,
  legacyLifter = False 
)

Member Function Documentation

def addBlastForce (   self,
  vector 
)
def debugPrint (   self,
  message 
)
for debugging
def deleteCollisions (   self)
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 getAirborneHeight (   self)
def getCollisionsActive (   self)
def getGravity (   self,
  gravity 
)
def getIsAirborne (   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,
  avatarRadius = 1.4,
  floorOffset = 1.0,
  reach = 1.0 
)
floorOffset is how high the avatar can reach.  I.e. if the avatar
    walks under a ledge that is <= floorOffset above the ground (a
    double floor situation), the avatar will step up on to the
    ledge (instantly).

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 effor 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,
  unused_parameter 
)
def setAvatar (   self,
  avatar 
)
def setAvatarPhysicsIndicator (   self,
  indicator 
)
indicator is a NodePath
def setCollisionRayHeight (   self,
  height 
)
def setCollisionsActive (   self,
  active = 1 
)
def setFloorBitMask (   self,
  bitMask 
)
def setGravity (   self,
  gravity 
)
def setMayJump (   self,
  task 
)
This function's use is internal to this class (maybe I'll add
the __ someday).  Anyway, if you want to enable or disable
jumping in a general way see the ControlManager (don't use this).
def setPriorParentVector (   self)
def setTag (   self,
  key,
  value 
)
def setupEventSphere (   self,
  bitmask,
  avatarRadius 
)
Set up the collision sphere
def setupFloorSphere (   self,
  bitmask,
  avatarRadius 
)
Set up the collision sphere
def setupRay (   self,
  bitmask,
  floorOffset,
  reach 
)
def setupWallSphere (   self,
  bitmask,
  avatarRadius 
)
Set up the collision sphere
def setWalkSpeed (   self,
  forward,
  jump,
  reverse,
  rotate 
)
def setWallBitMask (   self,
  bitMask 
)
def startJumpDelay (   self,
  delay 
)
def swapFloorBitMask (   self,
  oldMask,
  newMask 
)

Member Data Documentation

avatar
avatarControlForwardSpeed
avatarControlJumpForce
avatarControlReverseSpeed
avatarControlRotateSpeed
avatarNodePath
avatarRadius
cEventSphereNodePath
cFloorSphereNodePath
collisionsActive
controlsTask
cRay
cRayNodePath
cTrav
cWallSphereNodePath
tuple DiagonalFactor = math.sqrt(2.)
static
tuple earlyEventSphere = base.config.GetBool('early-event-sphere', 0)
static
event
falling
floorBitmask
getAirborneHeight
highMark
indicatorTask
isAirborne
jumpDelayTask
lifter
mayJump
moving
needToDeltaPos
tuple notify = directNotify.newCategory("GravityWalker")
static
physVelocityIndicator
priorParent
pusher
pusherFloorhandler
rotationSpeed
slideSpeed
speed
vel
wallBitmask
tuple wantDebugIndicator = base.config.GetBool('want-avatar-physics-indicator', 0)
static
tuple wantFloorSphere = base.config.GetBool('want-floor-sphere', 0)
static