Calling all Vizards,
I am trying to add the ability to mount and dismount a vehicle (FLT) in my scene. When dismounted the user should be able to walk around the environment as normal. Problem is when I only seem to able to perform this action once, maybe I am trying to do this the wrong way
. Here is a snippet of code to illustrate the way I am trying to achieve this.
Code:
import vizcam
def orbitCamera():
cam = vizcam.PivotNavigate(distance=4)
cam.centerNode(run)
bodyLink.remove()
def normalView():
bodyLink = viz.link(body,view,dstFlag=viz.LINK_BODY)
bodyLink.preTrans([0,-0.29,0.2])
def buttonTimer():
if joy.isButtonDown (3):
vizact.choice([orbitCamera(),normalView()],vizact.LOOP)
vizact.ontimer(viz.FASTEST_EXPIRATION,buttonTimer)
Do I need to use groups? If so, how?
Thanks for any help in advance,
Regards,
Nige