Panda3D
Public Member Functions | Public Attributes | Static Public Attributes

ShipPilot2 Class Reference

Inherits PhysicsWalker::PhysicsWalker.

List of all members.

Public Member Functions

def __init__
def addBlastForce
def avatarPhysicsIndicator
def debugPrint
def deleteCollisions
def determineHeight
def disableAvatarControls
def displayDebugInfo
def doDeltaPos
def enableAvatarControls
def getCollisionsActive
def getSpeeds
def getVelocity
def handleAvatarControls
def initializeCollisions
def oneTimeCollide
def placeOnFloor
def reset
def setAirborneHeightFunc
def setAvatar
def setAvatarPhysicsIndicator
def setCollisionsActive
def setFloorBitMask
def setPriorParentVector
def setTag
def setupAvatarPhysicsIndicator
def setupPhysics
def setupRay
def setupSphere
def setWalkSpeed
def setWallBitMask
def takedownPhysics

Public Attributes

 actorNode
 avatarControlForwardSpeed
 avatarControlJumpForce
 avatarControlReverseSpeed
 avatarControlRotateSpeed
 avatarNodePath
 avatarRadius
 backSphereOffset
 cBowSphere
 cBowSphereNode
 cBowSphereNodePath
 cHull
 cHullNode
 cHullNodePath
 collisionsActive
 collisionTags
 cRay
 cRayBitMask
 cRayNodePath
 cRayQueue
 cSphere
 cSphereBitMask
 cSphereNode
 cSphereNodePath
 cSternSphere
 cSternSphereBitMask
 cSternSphereNodePath
 cTrav
 currentTurning
 floorBitmask
 floorOffset
 frontSphereOffset
 getAirborneHeight
 height
 highMark
 isAirborne
 length
 lifter
 needToDeltaPos
 nodes
 physContactIndicator
 physVelocityIndicator
 priorParent
 priorParentNp
 pusher
 reach
 sailsDeployed
 ship
 straightHeading
 wallBitmask
 width

Static Public Attributes

float MAX_STRAIGHT_SAIL_BONUS = 4.0
tuple notify = directNotify.newCategory("PhysicsWalker")
float STRAIGHT_SAIL_BONUS_TIME = 10.0
int useBowSternSpheres = 1
int useDSSolid = 0
int useHeightRay = 0
int useLifter = 0
int useOneSphere = 0
tuple wantDebugIndicator

Constructor & Destructor Documentation

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

Member Function Documentation

def addBlastForce (   self,
  vector 
)
def avatarPhysicsIndicator (   self,
  task 
)
def debugPrint (   self,
  message 
)
for debugging
def deleteCollisions (   self)
def 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.
def disableAvatarControls (   self)
Ignore the arrow keys, etc.
def displayDebugInfo (   self)
For debug use.
def doDeltaPos (   self)
def enableAvatarControls (   self)
Activate the arrow keys, etc.
def getCollisionsActive (   self)
def getSpeeds (   self)
def getVelocity (   self)
def handleAvatarControls (   self,
  task 
)
Check on the arrow keys and update the avatar.
def initializeCollisions (   self,
  collisionTraverser,
  avatarRadius = 1.4,
  floorOffset = 1.0,
  reach = 1.0,
  width = 30.0,
  length = 105.0,
  height = 45.0 
)
width is feet from port to starboard.
length is feet from aft to bow.
height is feet from bildge to deck (i.e. not including mast height).

Set up the avatar collisions
def 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.
def 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.
def reset (   self)
def setAirborneHeightFunc (   self,
  getAirborneHeight 
)
def setAvatar (   self,
  ship 
)
def setAvatarPhysicsIndicator (   self,
  indicator 
)
indicator is a NodePath
def setCollisionsActive (   self,
  active = 1 
)
def setFloorBitMask (   self,
  bitMask 
)
def setPriorParentVector (   self)
def setTag (   self,
  key,
  value 
)
def setupAvatarPhysicsIndicator (   self)
def setupPhysics (   self,
  avatarNodePath 
)
def setupRay (   self,
  floorBitmask,
  floorOffset 
)
def setupSphere (   self,
  bitmask,
  avatarRadius 
)
Set up the collision sphere
def setWalkSpeed (   self,
  forward,
  jump,
  reverse,
  rotate 
)
def setWallBitMask (   self,
  bitMask 
)
def takedownPhysics (   self)

Member Data Documentation

float MAX_STRAIGHT_SAIL_BONUS = 4.0 [static]
tuple notify = directNotify.newCategory("PhysicsWalker") [static]
float STRAIGHT_SAIL_BONUS_TIME = 10.0 [static]
int useBowSternSpheres = 1 [static]
int useDSSolid = 0 [static]
int useHeightRay = 0 [static]
int useLifter = 0 [static]
int useOneSphere = 0 [static]
tuple wantDebugIndicator [static]
Initial value:
base.config.GetBool(
        'want-avatar-physics-indicator', 0)
 All Classes Namespaces Functions Variables Properties