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
21
S
5
G
1
Posts: 102
Reputation: 1,746

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
21
S
5
G
1
Posts: 102
Reputation: 1,746

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
21
S
5
G
1
Posts: 102
Reputation: 1,746

Post » Sat Feb 14, 2015 11:52 am

just like up down left and right

Right = 0
Left = 180
up = 270
down - 90
B
257
S
43
G
15
Posts: 1,992
Reputation: 41,535

Post » Sat Feb 14, 2015 5:08 pm

down is simple "90" not "-90"
B
78
S
23
G
69
Posts: 1,354
Reputation: 44,027

Post » Sun Feb 15, 2015 9:25 am

sorry typo should be Down = 90
B
257
S
43
G
15
Posts: 1,992
Reputation: 41,535


Return to How do I....?

Who is online

Users browsing this forum: OddConfection and 9 guests