16 lines
585 B
Text
16 lines
585 B
Text
|
base.localAvatar.collisionsOff()
|
||
|
from direct.interval.IntervalGlobal import *
|
||
|
toonFollowing = base.cr.doFindAll("NameOfToonYouWantToFollow")
|
||
|
def updatePos():
|
||
|
base.localAvatar.setX(toonFollowing[0].getX())
|
||
|
base.localAvatar.setY(toonFollowing[0].getY())
|
||
|
base.localAvatar.setZ(toonFollowing[0].getZ())
|
||
|
base.localAvatar.setH(toonFollowing[0].getH())
|
||
|
base.localAvatar.setP(toonFollowing[0].getP())
|
||
|
base.localAvatar.setR(toonFollowing[0].getR())
|
||
|
def onMovment():
|
||
|
mov = Sequence()
|
||
|
mov.append(Func(updatePos))
|
||
|
mov.append(Func(onMovment))
|
||
|
mov.start()
|
||
|
onMovment()
|