Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
PhysicsWalker Class Reference
Inheritance diagram for PhysicsWalker:

Public Member Functions

 __init__ (self, gravity=-32.1740, standableGround=0.707, hardLandingForce=16.0)
 
 addBlastForce (self, vector)
 
 avatarPhysicsIndicator (self, task)
 
 debugPrint (self, message)
 
 deleteCollisions (self)
 
 determineHeight (self)
 
 disableAvatarControls (self)
 
 displayDebugInfo (self)
 
 doDeltaPos (self)
 
 enableAvatarControls (self)
 
 flushEventHandlers (self)
 
 getCollisionsActive (self)
 
 getSpeeds (self)
 
 getVelocity (self)
 
 handleAvatarControls (self, task)
 
 initializeCollisions (self, collisionTraverser, avatarNodePath, wallBitmask, floorBitmask, avatarRadius=1.4, floorOffset=1.0, reach=1.0)
 
 oneTimeCollide (self)
 
 placeOnFloor (self)
 
 reset (self)
 
 setAirborneHeightFunc (self, getAirborneHeight)
 
 setAvatar (self, avatar)
 
 setAvatarPhysicsIndicator (self, indicator)
 
 setCollisionsActive (self, active=1)
 
 setPriorParentVector (self)
 
 setupAvatarPhysicsIndicator (self)
 
 setupPhysics (self, avatarNodePath)
 
 setupRay (self, floorBitmask, floorOffset)
 
 setupSphere (self, bitmask, avatarRadius)
 
 setWalkSpeed (self, forward, jump, reverse, rotate)
 

Public Attributes

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

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__()

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

Member Function Documentation

◆ addBlastForce()

addBlastForce ( self,
vector )

◆ avatarPhysicsIndicator()

avatarPhysicsIndicator ( self,
task )

◆ debugPrint()

debugPrint ( self,
message )
for debugging

◆ deleteCollisions()

deleteCollisions ( self)

◆ determineHeight()

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()

disableAvatarControls ( self)
Ignore the arrow keys, etc.

◆ displayDebugInfo()

displayDebugInfo ( self)
For debug use.

◆ doDeltaPos()

doDeltaPos ( self)

◆ enableAvatarControls()

enableAvatarControls ( self)
Activate the arrow keys, etc.

◆ flushEventHandlers()

flushEventHandlers ( self)

◆ getCollisionsActive()

getCollisionsActive ( self)

◆ getSpeeds()

getSpeeds ( self)

◆ getVelocity()

getVelocity ( self)

◆ handleAvatarControls()

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

◆ initializeCollisions()

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

◆ oneTimeCollide()

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()

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()

reset ( self)

◆ setAirborneHeightFunc()

setAirborneHeightFunc ( self,
getAirborneHeight )

◆ setAvatar()

setAvatar ( self,
avatar )

◆ setAvatarPhysicsIndicator()

setAvatarPhysicsIndicator ( self,
indicator )
indicator is a NodePath

◆ setCollisionsActive()

setCollisionsActive ( self,
active = 1 )

◆ setPriorParentVector()

setPriorParentVector ( self)

◆ setupAvatarPhysicsIndicator()

setupAvatarPhysicsIndicator ( self)

◆ setupPhysics()

setupPhysics ( self,
avatarNodePath )

◆ setupRay()

setupRay ( self,
floorBitmask,
floorOffset )

◆ setupSphere()

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

◆ setWalkSpeed()

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

◆ avatarPhysicsIndicator

avatarPhysicsIndicator

◆ 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

◆ handleAvatarControls

handleAvatarControls

◆ 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

◆ reset

reset

◆ useHeightRay

int useHeightRay = 0
static

◆ useLifter

int useLifter = 0
static

◆ wantDebugIndicator

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