Share My Creation LittleSquare Physics Demo

BeneBarros

Active Member
Licensed User
Longtime User
I did exactly as below
Dim Magn As Double = Sqrt((dist * 9.80665) / SinD(2*Abs(Angle)))

but you should have a problem
I had to add a variable to adjust the length
Dim Magn As Double = Sqrt((dist * 9.80665) / SinD(2*Abs(Angle))) * 2.575

see what I'm doing. (Unfinished)
 
Last edited:

BeneBarros

Active Member
Licensed User
Longtime User
does not work...
This equation returns the same result as the above.
I'll keep searching, see if I can find the solution.
Thanks for listening.
 

wonder

Expert
Licensed User
Longtime User
Another remark: Why are you using the real-world Gravity value?
In my source code, the gravity value (magnitude) is 1600:
B4X:
    'World Gravity
        tempGravity.setAngleAndMagnitudeD(90, 1600)
        World.Gravity = tempGravity
 
Last edited:

BeneBarros

Active Member
Licensed User
Longtime User
would it be this?
tempGravity.setAngleAndMagnitudeD(Abs(Angle), 1600)
World.GRAVITY = tempGravity
Dim dist As Double = (cvT.Left + 10 + TbPosX * 38) - GameBall.posX
Dim Force As Double = Sqrt((dist * World.GRAVITY.AngleD) / SinD(2*Abs(Angle)))

Excellent. Now it works perfect.
Thank you very much
 

BeneBarros

Active Member
Licensed User
Longtime User
Awesome!
Can you post a video with the end result?
yes ... I will make a new video .. although unfinished.
I must also complete the application in B4A for participants.


 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…