Physics Impulse as VALUE

Get help using Construct 2

Post » Sat May 12, 2012 6:30 am

Could someone please help me figure this out?

I have a ball that moves towards the mouse on click using a physics impulse. I use sin and cos to calculate the angle towards the mouse. Then I apply Physics Impulse to move at the speed of:

Impulse X (Calc_Gforce*Sprite.xvector)
Impulse Y (Calc_Gforce*Sprite.yvector)

{Calc_Gforce is a preset Global Var, and xvector/yvector is an object var that is updated every tick with trajectory}

How would I get the value of force for that impulse as a singular number every tick as I move the mouse around the screen before clicking? I want to create a FORCE BAR that will display how much force you will generate when clicking.

CAPX: https://www.box.com/s/9e767ea42a8916a92987https://www.box.com/s/9e767ea42a8916a92987


EDIT: - Updated fileZetar2012-05-12 06:34:59
B
192
S
6
G
7
Posts: 213
Reputation: 10,178

Post » Sat May 12, 2012 6:52 am

To simplify, (a stink at math) I have X speed and Y Speed, but I need the Force (magnitude) of these two. I.E. The speed at which the ball will travel when the variable force is applied at X & Y simultaneously.
B
192
S
6
G
7
Posts: 213
Reputation: 10,178


Return to How do I....?

Who is online

Users browsing this forum: heliogame, Yahoo [Bot] and 17 guests