Rotate and aim actor (Gun turret) at touch position on screen

ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296

Hello everyone.

I was wondering if anyone had a good template for helping me sort out a constrain actor/aim and shoot problem.

I have a tank actor on screen and when I click on a part of the screen the tank moves to that new position...thats sorted out.

Now, I have also constrained a turret actor to the x & y position of the tank so it sits nicely on top,

My problem now is to incorporate a new aim system so when the tank is static or moving, I want the turret to rotate and aim to any new position the player clicks on the screen (like shoot in this direction)...the turret need to rotate and aiming the direction of where the player clicked. I can then add a fire bullet to this.

Is there a good template or does anyone have a good idea on to active this?

Thanks guys

It takes a Zombie to know a Zombie!!!

Comments

Sign In or Register to comment.