Panda3D
|
Public Member Functions | |
__init__ (self, gravity=64.348, standableGround=0.707, hardLandingForce=16.0, legacyLifter=False) | |
addBlastForce (self, vector) | |
debugPrint (self, message) | |
deleteCollisions (self) | |
disableAvatarControls (self) | |
displayDebugInfo (self) | |
doDeltaPos (self) | |
enableAvatarControls (self) | |
flushEventHandlers (self) | |
getAirborneHeight (self) | |
getCollisionsActive (self) | |
getGravity (self, gravity) | |
getIsAirborne (self) | |
getSpeeds (self) | |
getVelocity (self) | |
handleAvatarControls (self, task) | |
initializeCollisions (self, collisionTraverser, avatarNodePath, avatarRadius=1.4, floorOffset=1.0, reach=1.0) | |
oneTimeCollide (self) | |
placeOnFloor (self) | |
reset (self) | |
setAirborneHeightFunc (self, unused_parameter) | |
setAvatar (self, avatar) | |
setAvatarPhysicsIndicator (self, indicator) | |
setCollisionRayHeight (self, height) | |
setCollisionsActive (self, active=1) | |
setFloorBitMask (self, bitMask) | |
setGravity (self, gravity) | |
setMayJump (self, task) | |
setPriorParentVector (self) | |
setTag (self, key, value) | |
setupEventSphere (self, bitmask, avatarRadius) | |
setupFloorSphere (self, bitmask, avatarRadius) | |
setupRay (self, bitmask, floorOffset, reach) | |
setupWallSphere (self, bitmask, avatarRadius) | |
setWalkSpeed (self, forward, jump, reverse, rotate) | |
setWallBitMask (self, bitMask) | |
startJumpDelay (self, delay) | |
swapFloorBitMask (self, oldMask, newMask) | |
Static Public Attributes | |
int | DiagonalFactor = math.sqrt(2.) / 2. |
earlyEventSphere = ConfigVariableBool('early-event-sphere', False) | |
notify = directNotify.newCategory("GravityWalker") | |
wantDebugIndicator = ConfigVariableBool('want-avatar-physics-indicator', False) | |
wantFloorSphere = ConfigVariableBool('want-floor-sphere', False) | |
Protected Attributes | |
_legacyLifter | |
__init__ | ( | self, | |
gravity = 64.348, | |||
standableGround = 0.707, | |||
hardLandingForce = 16.0, | |||
legacyLifter = False ) |
Reimplemented in BattleWalker, and TwoDWalker.
addBlastForce | ( | self, | |
vector ) |
debugPrint | ( | self, | |
message ) |
for debugging
deleteCollisions | ( | self | ) |
disableAvatarControls | ( | self | ) |
Ignore the arrow keys, etc.
displayDebugInfo | ( | self | ) |
For debug use.
doDeltaPos | ( | self | ) |
enableAvatarControls | ( | self | ) |
Activate the arrow keys, etc.
flushEventHandlers | ( | self | ) |
getAirborneHeight | ( | self | ) |
getCollisionsActive | ( | self | ) |
getGravity | ( | self, | |
gravity ) |
getIsAirborne | ( | self | ) |
getSpeeds | ( | self | ) |
Reimplemented in BattleWalker.
getVelocity | ( | self | ) |
handleAvatarControls | ( | self, | |
task ) |
Check on the arrow keys and update the avatar.
Reimplemented in BattleWalker, BattleWalker, and TwoDWalker.
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
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 | ( | self | ) |
Make a reasonable effor to place the avatar on the ground. For example, this is useful when switching away from the current walker.
reset | ( | self | ) |
setAirborneHeightFunc | ( | self, | |
unused_parameter ) |
setAvatar | ( | self, | |
avatar ) |
setAvatarPhysicsIndicator | ( | self, | |
indicator ) |
indicator is a NodePath
setCollisionRayHeight | ( | self, | |
height ) |
setCollisionsActive | ( | self, | |
active = 1 ) |
setFloorBitMask | ( | self, | |
bitMask ) |
setGravity | ( | self, | |
gravity ) |
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).
setPriorParentVector | ( | self | ) |
setTag | ( | self, | |
key, | |||
value ) |
setupEventSphere | ( | self, | |
bitmask, | |||
avatarRadius ) |
Set up the collision sphere
setupFloorSphere | ( | self, | |
bitmask, | |||
avatarRadius ) |
Set up the collision sphere
setupRay | ( | self, | |
bitmask, | |||
floorOffset, | |||
reach ) |
setupWallSphere | ( | self, | |
bitmask, | |||
avatarRadius ) |
Set up the collision sphere
setWalkSpeed | ( | self, | |
forward, | |||
jump, | |||
reverse, | |||
rotate ) |
setWallBitMask | ( | self, | |
bitMask ) |
startJumpDelay | ( | self, | |
delay ) |
swapFloorBitMask | ( | self, | |
oldMask, | |||
newMask ) |
|
protected |
avatar |
avatarControlForwardSpeed |
avatarControlJumpForce |
avatarControlReverseSpeed |
avatarControlRotateSpeed |
avatarNodePath |
avatarPhysicsIndicator |
avatarRadius |
cEventSphereNodePath |
cFloorSphereNodePath |
collisionsActive |
controlsTask |
cRay |
cRayNodePath |
cTrav |
cWallSphereNodePath |
|
static |
|
static |
event |
falling |
floorBitmask |
getAirborneHeight |
highMark |
indicatorTask |
isAirborne |
jumpDelayTask |
lifter |
mayJump |
moving |
needToDeltaPos |
|
static |
physVelocityIndicator |
priorParent |
pusher |
pusherFloor |
pusherFloorhandler |
rotationSpeed |
setMayJump |
slideSpeed |
speed |
vel |
wallBitmask |
|
static |
|
static |