Set platform vector to an angle

Get help using Construct 2

Post » Wed May 29, 2013 9:43 pm

So we have set vector X and set vector Y, which are kinda Apply force, but for Platform behavior. Speaking of physics, The Physics objects have a command called 'apply force at angle'.Is there any way to do that in Platform? I just have no idea how to convert an angle into X's and Y's.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377

Post » Wed May 29, 2013 9:50 pm

You have the speed and angle, that is the vector X and Y:

VectorX = speed*(cos(angle))
VectorY = speed*(sin(angle))
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Thu May 30, 2013 4:41 pm

Huh? Too much maths.
Should have been more clear. The Hero you control have the angle of 0( always), and when he collides with enemies from Super Metroid he gets sent to the opposite direction of where the enemy is. I don't alter the angle of the Hero sprite in any way. So, must I alter the Hero's angle for a fraction of a second, use vector X and vector Y stuff and then set his angle to 0?
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,377


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests