Page 1 of 1
Turret rotation
Posted: Wed Sep 29, 2010 1:34 pm
by Makkster
I'm currently learning how to configure the CrawlerExt and apply this to a tank model in Maya that I'd like to rig up.
I have added a firepower and would like to attach this to my high poly gun turret so that I can then use the right thumbstick on my xbox controller to make the gun turret rotate. Unfortunately I am lost trying to work out how to do this part.
Can anyone provide any pointers please?
Re: Turret rotation
Posted: Wed Sep 29, 2010 2:05 pm
by Micael Belin
The Firepower only deals with firing the actual cannon. To make the turret rotate, i recommend using the observercam. Not the most obvious use of a camera, i know, but it actually does it fairly well.
Place the camera on the pivot location for the turret. Then parent the camera to the chassis and the turret to the camera. The hierarchy would look something like chassis->camera->turret, where chassis is the grand parent.
Then simply bind yaw and pitch on the camera to your controller and you have a rotating turret.
Most turrets actually have two joints, one being the tower controlling yaw, then the barrel only controlling pitch. You can achieve this using two observercams, one controlling the tower and yaw, the other controlling the barrel and pitch. It's hierarchy would look something like:
chassis->obscam1_yaw->tower->obscam2_pitch->barrel.
Re: Turret rotation
Posted: Wed Sep 29, 2010 3:06 pm
by Makkster
Ha ha, no wonder i couldn't get it then. Thanks I shall give this method a try.
Re: Turret rotation
Posted: Wed Sep 29, 2010 3:43 pm
by Makkster
Ok, I gave that a go - it worked a treat! Thanks again.
Re: Turret rotation
Posted: Thu Sep 30, 2010 4:01 pm
by Makkster
"Most turrets actually have two joints, one being the tower controlling yaw, then the barrel only controlling pitch. You can achieve this using two observercams, one controlling the tower and yaw, the other controlling the barrel and pitch. It's hierarchy would look something like:
chassis->obscam1_yaw->tower->obscam2_pitch->barrel."
If I want to restrict the pitch of the barrel how would I do this?
Thanks.
Re: Turret rotation
Posted: Fri Oct 01, 2010 3:40 pm
by Patrik Martin
Makkster wrote:"Most turrets actually have two joints, one being the tower controlling yaw, then the barrel only controlling pitch. You can achieve this using two observercams, one controlling the tower and yaw, the other controlling the barrel and pitch. It's hierarchy would look something like:
chassis->obscam1_yaw->tower->obscam2_pitch->barrel."
If I want to restrict the pitch of the barrel how would I do this?
Thanks.
You are also able to use DirectInputLink and 1DRotator. The way you restrict it is to only set up the input setting for that perticular movement. In the case of the ObserverCam only use the Pich input for the barrel.