Constrain the angle of the canon towards the player

BigDaveBigDave Member Posts: 2,239

I guess you guys have a quick answer for this.

I want a canon that always points towards the player position. So I can place multiple canon's at different locations that all point to the player.

I constraint the X and Y of the Player as global game variables.

Within the canon actor code I did
(vectorToAngle( game.PlaneX , game.PlaneY ))

So I got the angle for the Player.
So now I have to figure how to get the coordinations of both compared so when I move my player it checks the difference between this two actor types.

How exactly would that work?

Comments

Sign In or Register to comment.