Panda3D
Public Member Functions | Public Attributes | Static Public Attributes

ShipPilot Class Reference

Inherits PhysicsWalker::PhysicsWalker.

List of all members.

Public Member Functions

def __init__
def adjustWallBitMask
def avatarPhysicsIndicator
def debugPrint
def deleteCollisions
def disableAvatarControls
def displayDebugInfo
def enableAvatarControls
def getMaxSpeed
def getVelocity
def handleAvatarControls
def initializeCollisions
def setAvatar
def setAvatarPhysicsIndicator
def setCollisionsActive
def setFloorBitMask
def setShip
def setTag
def setupAvatarPhysicsIndicator
def setupCollisions
def setupPhysics
def setWalkSpeed
def setWallBitMask
def takedownPhysics

Public Attributes

 actorNode
 bowPos
 cNodePath
 Combine them all.
 collisionsActive
 cRootNodePath
 cTrav
 currentTurning
 floorBitmask
 needToDeltaPos
 physContactIndicator
 physVelocityIndicator
 portPos
 pusher
 ship
 shipNodePath
 starboardPos
 sternPos
 straightHeading
 wallBitmask

Static Public Attributes

float MAX_STRAIGHT_SAIL_BONUS = 2.1
tuple notify = directNotify.newCategory("ShipPilot")
float REVERSE_STRAIGHT_SAIL_BONUS_TIME = 8.0
float STRAIGHT_SAIL_BONUS_TIME = 18.0
float TURNING_BONUS_REDUCTION = 3.0
tuple wantDebugIndicator

Constructor & Destructor Documentation

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

Member Function Documentation

def adjustWallBitMask (   self,
  oldMask,
  newMask 
)
def avatarPhysicsIndicator (   self,
  task 
)
def debugPrint (   self,
  message 
)
for debugging
def deleteCollisions (   self)
def disableAvatarControls (   self)
Ignore the arrow keys, etc.
def displayDebugInfo (   self)
For debug use.
def enableAvatarControls (   self)
Activate the arrow keys, etc.
def getMaxSpeed (   self)
def getVelocity (   self)
def handleAvatarControls (   self,
  task 
)
Check on the arrow keys and update the "avatar" (ship).
def initializeCollisions (   self,
  collisionTraverser,
  cRootNodePath,
  bow,
  stern,
  starboard,
  port 
)
Set up the avatar collisions.  All we do here is assign
the traverser.  All the ship specific stuff happens in
setAvatar() and its helper functions.
def setAvatar (   self,
  ship 
)
def setAvatarPhysicsIndicator (   self,
  indicator 
)
indicator is a NodePath
def setCollisionsActive (   self,
  active = 1 
)
def setFloorBitMask (   self,
  bitMask 
)
def setShip (   self,
  ship 
)
def setTag (   self,
  key,
  value 
)
def setupAvatarPhysicsIndicator (   self)
def setupCollisions (   self)
def setupPhysics (   self,
  shipNodePath 
)
def setWalkSpeed (   self,
  forward,
  jump,
  reverse,
  rotate 
)
def setWallBitMask (   self,
  bitMask 
)
def takedownPhysics (   self)

Member Data Documentation

Combine them all.

float MAX_STRAIGHT_SAIL_BONUS = 2.1 [static]
tuple notify = directNotify.newCategory("ShipPilot") [static]
float REVERSE_STRAIGHT_SAIL_BONUS_TIME = 8.0 [static]
float STRAIGHT_SAIL_BONUS_TIME = 18.0 [static]
float TURNING_BONUS_REDUCTION = 3.0 [static]
tuple wantDebugIndicator [static]
Initial value:
base.config.GetBool(
        'want-avatar-physics-indicator', 0)
 All Classes Namespaces Functions Variables Properties