Esempio n. 1
0
def lookToNewObj( av, objPOS ):
		lookAtYou(av)
		pos = viz.MainView.getPosition()
		#bodyPOS = setBodyPosition(pos, objPOS) # Controls avatar's orientation towards object.
		#av.lookAt(bodyPOS, roll=2)
		eul = av.getEuler() # Pitch set to '0' so that av doesn't roll backwards.
		eul[1] = 0
		av.setEuler(eul)
		head = av.getBone('Bip01 Head') # Calculates and controls fluid head orientation (yaw) towards object.
		head.lock()
		yaw = getHeadYawAngle(head, objPOS)
		if (objPOS[0] > 0):
			yaw = yaw * -1
		lookAtObj = vizact.boneSpinTo(head.getName(),mode=viz.AVATAR_LOCAL,euler=(yaw,eul[1],eul[2]),speed=130, interpolate=vizact.easeOutStrong)
		av.addAction(lookAtObj)
		av.idlepose( -1 )
Esempio n. 2
0
def lookAtGround( av ) :
		head = av.getBone('Bip01 Head')
		head.lock()
		lookDown = vizact.boneSpinTo(head.getName(),mode=viz.AVATAR_LOCAL,euler=(0,30,0),speed=50, interpolate=vizact.easeOutStrong)
		av.addAction(lookDown)
		av.idlepose( -1 )
Esempio n. 3
0
def reset( av ):
		head = av.getBone('Bip01 Head')
		lookStraight = vizact.boneSpinTo('Bip01 Head',mode=viz.AVATAR_LOCAL,euler=(0,0,0),speed=200, interpolate=vizact.easeInOut)
		av.runAction(lookStraight)
		av.setEuler(origEUL)
		av.setPosition(origPOS)
Esempio n. 4
0
def lookOutWindow( av ):
		head = av.getBone('Bip01 Head')
		head.lock()
		toRight = vizact.boneSpinTo(head.getName(),mode=viz.AVATAR_LOCAL,euler=(-65,0,0),speed=150, interpolate=vizact.easeOutStrong)
		av.runAction(toRight)
		av.idlepose( -1 )