Rotate To Angle

Got a brain tester for you.

Objective: Creating e.g. a long tank that moves around the map, but has 2-3 turrets that are not centered to the middle of the tank actor. These turrets rotate separate from the tank.

I have watched the tutorial on youTube about the tank and turret, which is very good. But it works if your turret is centered to the tank actor.

So how would you keep the turrets in their correct place while the tank is turning?
Regarding rotating turrets, I used Rotate to Angle( vectorToAngle(targetX - selfX, targetY - selfY) now this worked on a tutorial (Rotate Spawn from design3) but this didn't work for me. Is the above correct?

I dislike asking for help, but now after 4 days and many many cups of coffee later I need the help.

Thank you all

Regards

DNA

Comments

  • _DNA__DNA_ Member Posts: 9
    I can move the actor around and I can keep the turret to the middle of the tank actor, I just cant get the turrets to stay in position while the LONG tank actor is turning...
  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2014
  • _DNA__DNA_ Member Posts: 9
    Just what I'm looking for :) next time your in the pub, buy a paint from me!
  • SocksSocks London, UK.Member Posts: 12,822
    Just what I'm looking for :) next time your in the pub, buy a paint from me!
    Are you a painter and decorator ?
  • _DNA__DNA_ Member Posts: 9
    Just what I'm looking for :) next time your in the pub, buy a paint from me!
    Are you a painter and decorator ?
    oops "pint" was typing too fast, thank you again

Sign In or Register to comment.