How do I make an object rotate around another

Get help using Construct 2

Post » Sat Feb 13, 2016 6:57 am

Im trying to make an object spin constantly around another player controlled object. For example, I want the player to be able to move a sprite (let's call it spr_a) around the layout like a top-down shooter. I already am aware how to do that. But how do I make (spr_b) rotate quickly around it like a shield, wherever the sprite is moved. Hopefully that made sense lol. Thanks guys!
B
6
Posts: 30
Reputation: 310

Post » Sat Feb 13, 2016 1:53 pm

You could use the Lenghtdir() function, which returns the position of a point in a radius of x pixels around another point in an y angle.
Image
To tweak the rotating speed, simply increase or decrease the rotation_angle change every tick.
B
3
Posts: 7
Reputation: 189

Post » Sat Feb 13, 2016 11:20 pm

Ah ok, I'll try that. Thanks!
B
6
Posts: 30
Reputation: 310


Return to How do I....?

Who is online

Users browsing this forum: BiffanyPFH and 29 guests