mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
*** empty log message ***
This commit is contained in:
parent
9bf6494bc1
commit
98ed707e6a
@ -82,6 +82,10 @@ class BattleWalker(GravityWalker.GravityWalker):
|
|||||||
self.__oldDt = ClockObject.getGlobalClock().getDt()
|
self.__oldDt = ClockObject.getGlobalClock().getDt()
|
||||||
dt=self.__oldDt
|
dt=self.__oldDt
|
||||||
|
|
||||||
|
# Before we do anything with position or orientation, make the avatar
|
||||||
|
# face it's target
|
||||||
|
self.avatarNodePath.headsUp(self.targetNp)
|
||||||
|
|
||||||
# Check to see if we're moving at all:
|
# Check to see if we're moving at all:
|
||||||
self.moving = self.speed or self.slideSpeed or self.rotationSpeed or (self.priorParent!=Vec3.zero())
|
self.moving = self.speed or self.slideSpeed or self.rotationSpeed or (self.priorParent!=Vec3.zero())
|
||||||
if self.moving:
|
if self.moving:
|
||||||
@ -89,10 +93,6 @@ class BattleWalker(GravityWalker.GravityWalker):
|
|||||||
slideDistance = dt * self.slideSpeed
|
slideDistance = dt * self.slideSpeed
|
||||||
rotation = dt * self.rotationSpeed
|
rotation = dt * self.rotationSpeed
|
||||||
|
|
||||||
# Before we do anything with position or orientation, make the avatar
|
|
||||||
# face it's target
|
|
||||||
self.avatarNodePath.headsUp(self.targetNp)
|
|
||||||
|
|
||||||
# Take a step in the direction of our previous heading.
|
# Take a step in the direction of our previous heading.
|
||||||
self.vel=Vec3(Vec3.forward() * distance +
|
self.vel=Vec3(Vec3.forward() * distance +
|
||||||
Vec3.right() * slideDistance)
|
Vec3.right() * slideDistance)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user