mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
added legacy lifter support
This commit is contained in:
parent
d6539855a1
commit
25ea239df0
@ -32,12 +32,13 @@ class GravityWalker(DirectObject.DirectObject):
|
||||
|
||||
# special methods
|
||||
def __init__(self, gravity = 64.348, standableGround=0.707,
|
||||
hardLandingForce=16.0):
|
||||
hardLandingForce=16.0, legacyLifter=False):
|
||||
assert self.notify.debugStateCall(self)
|
||||
DirectObject.DirectObject.__init__(self)
|
||||
self.__gravity=gravity
|
||||
self.__standableGround=standableGround
|
||||
self.__hardLandingForce=hardLandingForce
|
||||
self._legacyLifter = legacyLifter
|
||||
|
||||
self.mayJump = 1
|
||||
self.jumpDelayTask = None
|
||||
@ -187,6 +188,8 @@ class GravityWalker(DirectObject.DirectObject):
|
||||
|
||||
# set up floor collision mechanism
|
||||
self.lifter = CollisionHandlerGravity()
|
||||
#self.lifter = CollisionHandlerHighestEvent()
|
||||
self.lifter.setLegacyMode(self._legacyLifter)
|
||||
self.lifter.setGravity(self.__gravity)
|
||||
self.lifter.addInPattern("enter%in")
|
||||
self.lifter.addAgainPattern("again%in")
|
||||
|
Loading…
x
Reference in New Issue
Block a user