How do I make my actor shoot to where I click my mouse
I have a game where my player actor can shoot bullets at other moving actors. When I click my mouse I have it so that the bullet spawns but I want the bullet start to move in the directin of the mouse. This is so that you can change the angle that you shoot the bullet actor. Now i have seen videos on making actors spawn and follow the mouse on the screen but I do not what that. I want this actor to stay in the direction of movement even if move the mouse position. Like a normal bullet after it is fired. Any help would be appreciated. Thanks.
Comments
Hi, what you'll want to do is add two Game Attributes to your game called, MouseX and MouseY. When you click the mouse/or touch the screen record those X and Y coordinates to these two new attributes.
Then use a Move To Behavior on your bullet actor and move to these new coordinates.
Thanks I think i found it out.
Do comments really need approved now? I just got that message twice...
Anyway, glad you got it worked out.
cool
Glad to hear it
cool
Glad to hear it