|
Panda3D
|
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 Member Functions inherited from DirectObject | |
| __init__ (self) | |
| accept (self, event, method, extraArgs=[]) | |
| acceptOnce (self, event, method, extraArgs=[]) | |
| addTask (self, *args, **kwargs) | |
| detectLeaks (self) | |
| doMethodLater (self, *args, **kwargs) | |
| getAllAccepting (self) | |
| ignore (self, event) | |
| ignoreAll (self) | |
| isAccepting (self, event) | |
| isIgnoring (self, event) | |
| removeAllTasks (self) | |
| removeTask (self, taskOrName) | |
Public Attributes | |
| acForce = LinearVectorForce(0.0, 0.0, 0.0) | |
| actorNode = ActorNode("PW physicsActor") | |
| avatar = avatar | |
| int | avatarControlForwardSpeed = 0 |
| int | avatarControlJumpForce = 0 |
| int | avatarControlReverseSpeed = 0 |
| int | avatarControlRotateSpeed = 0 |
| avatarNodePath = render.attachNewNode("physContactIndicator") | |
| avatarPhysicsIndicator | |
| avatarRadius = avatarRadius | |
| avatarViscosity = LinearFrictionForce(0.0, 1.0, 0) | |
| int | collisionsActive = 0 |
| cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0) | |
| cRayBitMask = floorBitmask | |
| cRayNodePath = self.avatarNodePath.attachNewNode(cRayNode) | |
| cRayQueue = CollisionHandlerQueue() | |
| cSphere = CollisionSphere(0.0, 0.0, centerHeight, avatarRadius) | |
| cSphereBitMask = bitmask | |
| cSphereNodePath = self.avatarNodePath.attachNewNode(cSphereNode) | |
| cTrav = collisionTraverser | |
| float | floorOffset = 7.0 |
| getAirborneHeight = None | |
| gravity = gravity | |
| handleAvatarControls = "AvatarControls-%s"%(id(self),) | |
| int | highMark = 0 |
| int | isAirborne = 0 |
| lifter = CollisionHandlerFloor() | |
| int | needToDeltaPos = 0 |
| phys = PhysicsManager() | |
| physContactIndicator = contactIndicatorNode | |
| physVelocityIndicator = None | |
| priorParent = priorParent | |
| priorParentNp = fnp | |
| pusher = PhysicsCollisionHandler() | |
| reset | |
Static Public Attributes | |
| notify = DirectNotifyGlobal.directNotify.newCategory("PhysicsWalker") | |
| int | useHeightRay = 0 |
| int | useLifter = 0 |
| wantDebugIndicator = ConfigVariableBool('want-avatar-physics-indicator', False) | |
Static Public Attributes inherited from DirectObject | |
| accept_once = acceptOnce | |
| add_task = addTask | |
| detect_leaks = detectLeaks | |
| do_method_later = doMethodLater | |
| get_all_accepting = getAllAccepting | |
| ignore_all = ignoreAll | |
| is_accepting = isAccepting | |
| is_ignoring = isIgnoring | |
| remove_all_tasks = removeAllTasks | |
| remove_task = removeTask | |
Additional Inherited Members | |
Protected Member Functions inherited from DirectObject | |
| _addTask (self, task) | |
| _clearTask (self, task) | |
Protected Attributes inherited from DirectObject | |
| dict | _taskList = {} |
| __init__ | ( | self, | |
| gravity = -32.1740, | |||
| standableGround = 0.707, | |||
| hardLandingForce = 16.0 ) |
| addBlastForce | ( | self, | |
| vector ) |
| avatarPhysicsIndicator | ( | self, | |
| task ) |
| debugPrint | ( | self, | |
| message ) |
for debugging
| deleteCollisions | ( | self | ) |
| 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 | ( | self | ) |
Ignore the arrow keys, etc.
| displayDebugInfo | ( | self | ) |
For debug use.
| doDeltaPos | ( | self | ) |
| enableAvatarControls | ( | self | ) |
Activate the arrow keys, etc.
| flushEventHandlers | ( | self | ) |
| getCollisionsActive | ( | self | ) |
| getSpeeds | ( | self | ) |
| getVelocity | ( | self | ) |
| handleAvatarControls | ( | self, | |
| task ) |
Check on the arrow keys and update the avatar.
| initializeCollisions | ( | self, | |
| collisionTraverser, | |||
| avatarNodePath, | |||
| wallBitmask, | |||
| floorBitmask, | |||
| avatarRadius = 1.4, | |||
| floorOffset = 1.0, | |||
| reach = 1.0 ) |
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 effort to place the avatar on the ground. For example, this is useful when switching away from the current walker.
| reset | ( | self | ) |
| setAirborneHeightFunc | ( | self, | |
| getAirborneHeight ) |
| setAvatar | ( | self, | |
| avatar ) |
| setAvatarPhysicsIndicator | ( | self, | |
| indicator ) |
indicator is a NodePath
| setCollisionsActive | ( | self, | |
| active = 1 ) |
| setPriorParentVector | ( | self | ) |
| setupAvatarPhysicsIndicator | ( | self | ) |
| setupPhysics | ( | self, | |
| avatarNodePath ) |
| setupRay | ( | self, | |
| floorBitmask, | |||
| floorOffset ) |
| setupSphere | ( | self, | |
| bitmask, | |||
| avatarRadius ) |
Set up the collision sphere
| setWalkSpeed | ( | self, | |
| forward, | |||
| jump, | |||
| reverse, | |||
| rotate ) |
| acForce = LinearVectorForce(0.0, 0.0, 0.0) |
| actorNode = ActorNode("PW physicsActor") |
| avatar = avatar |
| int avatarControlForwardSpeed = 0 |
| int avatarControlJumpForce = 0 |
| int avatarControlReverseSpeed = 0 |
| int avatarControlRotateSpeed = 0 |
| avatarNodePath = render.attachNewNode("physContactIndicator") |
| avatarPhysicsIndicator |
| avatarRadius = avatarRadius |
| avatarViscosity = LinearFrictionForce(0.0, 1.0, 0) |
| collisionsActive = 0 |
| cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0) |
| cRayBitMask = floorBitmask |
| cRayNodePath = self.avatarNodePath.attachNewNode(cRayNode) |
| cRayQueue = CollisionHandlerQueue() |
| cSphere = CollisionSphere(0.0, 0.0, centerHeight, avatarRadius) |
| cSphereBitMask = bitmask |
| cSphereNodePath = self.avatarNodePath.attachNewNode(cSphereNode) |
| cTrav = collisionTraverser |
| float floorOffset = 7.0 |
| getAirborneHeight = None |
| gravity = gravity |
| handleAvatarControls = "AvatarControls-%s"%(id(self),) |
| highMark = 0 |
| isAirborne = 0 |
| lifter = CollisionHandlerFloor() |
| int needToDeltaPos = 0 |
|
static |
| phys = PhysicsManager() |
| physContactIndicator = contactIndicatorNode |
| physVelocityIndicator = None |
| priorParent = priorParent |
| priorParentNp = fnp |
| pusher = PhysicsCollisionHandler() |
| reset |
|
static |
|
static |
|
static |