How do I set correct bullet angle of motion?

Get help using Construct 2

Post » Fri Feb 13, 2015 3:57 am

I have my character pinned to a rotating platform and has bullet disabled until key is pressed. On key press/tap, how do I set the angle of motion of my character to go away from the platform? Thank you!
B
17
S
3
Posts: 98
Reputation: 1,118

Post » Fri Feb 13, 2015 4:13 am

I unpinned and enabled bullet on tap and set angle of motion to angle(platform.x,platform.y,character.x,character.y) but its still not working correctly. :-(
B
17
S
3
Posts: 98
Reputation: 1,118

Post » Fri Feb 13, 2015 5:22 am

Trying to move like barrels in donkey kong?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Fri Feb 13, 2015 5:56 am

So, because an object lying flat is technically at 0 degrees, when you want your character to fly off perpendicularly, you actually want to travel at -90 degrees, or 270. So rather than set the angle of motion to that angle, you want [RotatingObject.Angle-90]
Here's a .capx that does, I think, what you want.
You do not have the required permissions to view the files attached to this post.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sat Feb 14, 2015 2:00 am

-90 = 270... gotcha. Thanks!
B
17
S
3
Posts: 98
Reputation: 1,118

Post » Sat Feb 14, 2015 11:52 am

just like up down left and right

Right = 0
Left = 180
up = 270
down - 90
B
212
S
28
G
14
Posts: 1,865
Reputation: 36,874

Post » Sat Feb 14, 2015 5:08 pm

down is simple "90" not "-90"
ImageImage
B
54
S
14
G
64
Posts: 1,252
Reputation: 39,475

Post » Sun Feb 15, 2015 9:25 am

sorry typo should be Down = 90
B
212
S
28
G
14
Posts: 1,865
Reputation: 36,874


Return to How do I....?

Who is online

Users browsing this forum: josevasquez and 19 guests