Set object impulse towards to an angle

Get help using Construct 2

Post » Sun Oct 07, 2012 2:50 pm

Hi everyone,


I'm a beginner in Construct 2 and I have already read the basic guide but I'm freaking out to figure how to solve this issue on Construct 2, I hope someone can help me.
I have an object where I apply physics to it. I would like to set an impulse upwards with a random angle between 45 and 135 everytime I touch the object, always taking the angle reference the floor. The object should bounce with walls to.
I was able to make some of those features not to work all of the together.

Any suggestion?

Best regards
B
3
Posts: 6
Reputation: 312

Post » Sun Oct 07, 2012 3:19 pm

Post you CAPX and let's see what you've got
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Sun Oct 07, 2012 3:30 pm

Is this what you're after?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Post » Mon Oct 08, 2012 8:53 am

Thanks sqiddster, that was working fine! :)

I made the mistake of using random(90,135) instead of random(225,315) but after your code I realised that the X,Y was wrong.

best regards!
B
3
Posts: 6
Reputation: 312


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests