AI help, Sprite rotate help?!

Get help using Construct 2

Post » Fri Feb 03, 2012 7:15 pm

K, so first off i wanna know how to make AI chase after my player sprite, and second i need to know how to stop the player from rotating AROUND a pivot point when looking towards my mouse and just rotate on the spot, much appreciated thx
B
2
Posts: 5
Reputation: 260

Post » Fri Feb 03, 2012 7:46 pm

You can make it face the mouse my adding the event:

System.EveryTick
     ->Sprite.SetAngleTowardsPosition(Mouse.x, Mouse.y)
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Fri Feb 03, 2012 7:51 pm

i did that and what it does is it rotates in a wide circle around a middle pivot to look at my mouse point
B
2
Posts: 5
Reputation: 260

Post » Fri Feb 03, 2012 8:00 pm

So what do you want it to do exactly?
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Fri Feb 03, 2012 9:03 pm

It sounds like your origin point on your Sprite image is not centered. double click on the sprite that you want to look at the mouse and check where the red origin point is. It will always rotate at that point.
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Mon Feb 06, 2012 4:29 pm

@Zetar thx alot it worked
B
2
Posts: 5
Reputation: 260


Return to How do I....?

Who is online

Users browsing this forum: CavalierBubble, imnotspecial and 20 guests