Panda3D
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
PhysicsWalker Class Reference
Inheritance diagram for PhysicsWalker:

Public Member Functions

def __init__ (self, gravity=-32.1740, standableGround=0.707, hardLandingForce=16.0)
 
def addBlastForce (self, vector)
 
def avatarPhysicsIndicator (self, task)
 
def debugPrint (self, message)
 
def deleteCollisions (self)
 
def determineHeight (self)
 
def disableAvatarControls (self)
 
def displayDebugInfo (self)
 
def doDeltaPos (self)
 
def enableAvatarControls (self)
 
def flushEventHandlers (self)
 
def getCollisionsActive (self)
 
def getSpeeds (self)
 
def getVelocity (self)
 
def handleAvatarControls (self, task)
 
def initializeCollisions (self, collisionTraverser, avatarNodePath, wallBitmask, floorBitmask, avatarRadius=1.4, floorOffset=1.0, reach=1.0)
 
def oneTimeCollide (self)
 
def placeOnFloor (self)
 
def reset (self)
 
def setAirborneHeightFunc (self, getAirborneHeight)
 
def setAvatar (self, avatar)
 
def setAvatarPhysicsIndicator (self, indicator)
 
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)
 
def setWalkSpeed (self, forward, jump, reverse, rotate)
 

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

 notify = DirectNotifyGlobal.directNotify.newCategory("PhysicsWalker")
 
int useHeightRay = 0
 
int useLifter = 0
 
 wantDebugIndicator = ConfigVariableBool('want-avatar-physics-indicator', False)
 

Constructor & Destructor Documentation

◆ __init__()

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

Member Function Documentation

◆ addBlastForce()

def addBlastForce (   self,
  vector 
)

◆ avatarPhysicsIndicator()

def avatarPhysicsIndicator (   self,
  task 
)

◆ debugPrint()

def debugPrint (   self,
  message 
)
for debugging

◆ deleteCollisions()

def deleteCollisions (   self)

◆ determineHeight()

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.

◆ disableAvatarControls()

def disableAvatarControls (   self)
Ignore the arrow keys, etc.

◆ displayDebugInfo()

def displayDebugInfo (   self)
For debug use.

◆ doDeltaPos()

def doDeltaPos (   self)

◆ enableAvatarControls()

def enableAvatarControls (   self)
Activate the arrow keys, etc.

◆ flushEventHandlers()

def flushEventHandlers (   self)

◆ getCollisionsActive()

def getCollisionsActive (   self)

◆ getSpeeds()

def getSpeeds (   self)

◆ getVelocity()

def getVelocity (   self)

◆ handleAvatarControls()

def handleAvatarControls (   self,
  task 
)
Check on the arrow keys and update the avatar.

◆ initializeCollisions()

def initializeCollisions (   self,
  collisionTraverser,
  avatarNodePath,
  wallBitmask,
  floorBitmask,
  avatarRadius = 1.4,
  floorOffset = 1.0,
  reach = 1.0 
)
Set up the avatar collisions

◆ oneTimeCollide()

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.

◆ placeOnFloor()

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.

◆ reset()

def reset (   self)

◆ setAirborneHeightFunc()

def setAirborneHeightFunc (   self,
  getAirborneHeight 
)

◆ setAvatar()

def setAvatar (   self,
  avatar 
)

◆ setAvatarPhysicsIndicator()

def setAvatarPhysicsIndicator (   self,
  indicator 
)
indicator is a NodePath

◆ setCollisionsActive()

def setCollisionsActive (   self,
  active = 1 
)

◆ setPriorParentVector()

def setPriorParentVector (   self)

◆ setupAvatarPhysicsIndicator()

def setupAvatarPhysicsIndicator (   self)

◆ setupPhysics()

def setupPhysics (   self,
  avatarNodePath 
)

◆ setupRay()

def setupRay (   self,
  floorBitmask,
  floorOffset 
)

◆ setupSphere()

def setupSphere (   self,
  bitmask,
  avatarRadius 
)
Set up the collision sphere

◆ setWalkSpeed()

def setWalkSpeed (   self,
  forward,
  jump,
  reverse,
  rotate 
)

Member Data Documentation

◆ acForce

acForce

◆ actorNode

actorNode

◆ avatar

avatar

◆ avatarControlForwardSpeed

avatarControlForwardSpeed

◆ avatarControlJumpForce

avatarControlJumpForce

◆ avatarControlReverseSpeed

avatarControlReverseSpeed

◆ avatarControlRotateSpeed

avatarControlRotateSpeed

◆ avatarNodePath

avatarNodePath

◆ avatarRadius

avatarRadius

◆ avatarViscosity

avatarViscosity

◆ collisionsActive

collisionsActive

◆ cRay

cRay

◆ cRayBitMask

cRayBitMask

◆ cRayNodePath

cRayNodePath

◆ cRayQueue

cRayQueue

◆ cSphere

cSphere

◆ cSphereBitMask

cSphereBitMask

◆ cSphereNodePath

cSphereNodePath

◆ cTrav

cTrav

◆ floorOffset

floorOffset

◆ getAirborneHeight

getAirborneHeight

◆ gravity

gravity

◆ highMark

highMark

◆ isAirborne

isAirborne

◆ lifter

lifter

◆ needToDeltaPos

needToDeltaPos

◆ notify

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

◆ phys

phys

◆ physContactIndicator

physContactIndicator

◆ physVelocityIndicator

physVelocityIndicator

◆ priorParent

priorParent

◆ priorParentNp

priorParentNp

◆ pusher

pusher

◆ useHeightRay

int useHeightRay = 0
static

◆ useLifter

int useLifter = 0
static

◆ wantDebugIndicator

wantDebugIndicator = ConfigVariableBool('want-avatar-physics-indicator', False)
static