Panda3D

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

## Public Member Functions
| __init__ (self)
| addBlastForce (self, vector)
| debugPrint (self, message)
| deleteCollisions (self)
| disableAvatarControls (self)
| displayDebugInfo (self)
| doDeltaPos (self)
| enableAvatarControls (self)
| flushEventHandlers (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, getAirborneHeight)
| setAvatar (self, avatar)
| setCollisionsActive (self, active=1)
| setFloorBitMask (self, bitMask)
| setTag (self, key, value)
| setWalkSpeed (self, forward, jump, reverse, rotate)
| setWallBitMask (self, bitMask)
| swapFloorBitMask (self, oldMask, newMask)
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
| avatar = avatar
| avatarControlForwardSpeed = forward
| avatarControlReverseSpeed = reverse
| avatarControlRotateSpeed = rotate
| avatarNodePath = avatarNodePath
int | collisionsActive = 0
| cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0)
| cRayBitMask = bitMask
| cRayNodePath = avatarNodePath.attachNewNode(cRayNode)
| cSphere = CollisionSphere(0.0, 0.0, 0.0, avatarRadius)
| cSphereBitMask = bitMask
| cSphereNodePath = avatarNodePath.attachNewNode(cSphereNode)
| cTrav = collisionTraverser
| getAirborneHeight = getAirborneHeight
| handleAvatarControls
| lifter = CollisionHandlerFloor()
| pusher = CollisionHandlerPusher()
float | rotationSpeed = 0.0
float | slideSpeed = 0.0
float | speed = 0.0
int | stopThisFrame = 0
| vel = Vec3(0.0, 0.0, 0.0)
int | worldVelocity = Vec3.zero()

## Static Public Attributes
| notify = DirectNotifyGlobal.directNotify.newCategory("NonPhysicsWalker")
str | slideName = "slide-is-disabled"
| 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

## Protected Member Functions
| _calcSpeeds (self)
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)

## Additional Inherited Members
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self | ) |

## Member Function Documentation

## ◆ _calcSpeeds()

_calcSpeeds | ( |  | self | ) |
| protected

Reimplemented in SwimWalker.

## ◆ addBlastForce()

addBlastForce | ( |  | self,
|  |  | vector )

## ◆ debugPrint()

debugPrint | ( |  | self,
|  |  | message )

    for debugging

## ◆ deleteCollisions()

deleteCollisions | ( |  | self | ) |

Reimplemented in ObserverWalker.

## ◆ disableAvatarControls()

disableAvatarControls | ( |  | self | ) |

    Ignore the arrow keys, etc.

Reimplemented in ObserverWalker.

## ◆ displayDebugInfo()

displayDebugInfo | ( |  | self | ) |

    For debug use.

## ◆ doDeltaPos()

doDeltaPos | ( |  | self | ) |

## ◆ enableAvatarControls()

enableAvatarControls | ( |  | self | ) |

    Activate the arrow keys, etc.

Reimplemented in ObserverWalker.

## ◆ flushEventHandlers()

flushEventHandlers | ( |  | 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,
|  |  | avatarRadius = 1.4,
|  |  | floorOffset = 1.0,
|  |  | reach = 1.0 )

    Set up the avatar for collisions

Reimplemented in ObserverWalker.

## ◆ 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.

Reimplemented in ObserverWalker.

## ◆ placeOnFloor()

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

reset | ( |  | self | ) |

## ◆ setAirborneHeightFunc()

setAirborneHeightFunc | ( |  | self,
|  |  | getAirborneHeight )

## ◆ setAvatar()

setAvatar | ( |  | self,
|  |  | avatar )

## ◆ setCollisionsActive()

setCollisionsActive | ( |  | self,
|  |  | active = 1 )

Reimplemented in ObserverWalker.

## ◆ setFloorBitMask()

setFloorBitMask | ( |  | self,
|  |  | bitMask )

## ◆ setTag()

setTag | ( |  | self,
|  |  | key,
|  |  | value )

## ◆ setWalkSpeed()

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

## ◆ setWallBitMask()

setWallBitMask | ( |  | self,
|  |  | bitMask )

## ◆ swapFloorBitMask()

swapFloorBitMask | ( |  | self,
|  |  | oldMask,
|  |  | newMask )

## Member Data Documentation

## ◆ avatar

avatar = avatar

## ◆ avatarControlForwardSpeed

avatarControlForwardSpeed = forward

## ◆ avatarControlReverseSpeed

avatarControlReverseSpeed = reverse

## ◆ avatarControlRotateSpeed

avatarControlRotateSpeed = rotate

## ◆ avatarNodePath

avatarNodePath = avatarNodePath

## ◆ collisionsActive

int collisionsActive = 0

## ◆ cRay

cRay = CollisionRay(0.0, 0.0, CollisionHandlerRayStart, 0.0, 0.0, -1.0)

## ◆ cRayBitMask

cRayBitMask = bitMask

## ◆ cRayNodePath

cRayNodePath = avatarNodePath.attachNewNode(cRayNode)

## ◆ cSphere

cSphere = CollisionSphere(0.0, 0.0, 0.0, avatarRadius)

## ◆ cSphereBitMask

cSphereBitMask = bitMask

## ◆ cSphereNodePath

cSphereNodePath = avatarNodePath.attachNewNode(cSphereNode)

## ◆ cTrav

cTrav = collisionTraverser

## ◆ getAirborneHeight

getAirborneHeight = getAirborneHeight

## ◆ handleAvatarControls

handleAvatarControls

## ◆ lifter

lifter = CollisionHandlerFloor()

## ◆ notify

notify = DirectNotifyGlobal.directNotify.newCategory("NonPhysicsWalker")
| static

## ◆ pusher

pusher = CollisionHandlerPusher()

## ◆ rotationSpeed

rotationSpeed = 0.0

## ◆ slideName

str slideName = "slide-is-disabled"
| static

## ◆ slideSpeed

slideSpeed = 0.0

## ◆ speed

speed = 0.0

## ◆ stopThisFrame

int stopThisFrame = 0

## ◆ vel

vel = Vec3(0.0, 0.0, 0.0)

## ◆ wantDebugIndicator

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

## ◆ worldVelocity

int worldVelocity = Vec3.zero()