Apply forces and simulate flight

Hello all together,

i am looking for a solution to apply a force on a component (e.g. a ball) and simulate it’s flight path with the influence of gravity.
I added the “PhysicsEntity” to a ball and figured out, that it is falling downwards (along -z-axis). Is there a way to apply a force in x-,y- and z-direction to accelerate the ball and simulate the flight parabola?
Can anyone point me in the right direction to do this?

Thank you for your help in advance!

Interesting question, I would like to see the end results. What happens if you use small conveyor to apply force? Maybe physics lessons can help, in case you have not noticed these: https://academy.visualcomponents.com/category/lessons/physics/

Hy,

I have done something in the past for developing some other things with it.
Catapult_v03_Video.vcax (3.1 MB)
What do you think? :wink:

Regards
Feature

4 Likes

Hi,
thank you for your answer. The physics lessons focus more on friction and colliders of physical entities and don’t give a solution to my problem.

Hi Feature,

thanks for your quick answer. What you showed in the video is exactly what I want to do (throwing and additionally catching the ball). How did you simulate the flight path?

Best regards,

EDM1

Hy,

I do this by implementing a pythonscript which draw the (calculated) slate throw (from formular “Bewegungsgleichung” in picture below) as vclineset.

More difficult is adjusting the Physics parameters so, that the ball behaves like the calculation… :nerd_face:

Regards
Feature

Hi,

I don’t have any experience with python scripting in Visual Components. Might it be possible that you provide the relevant parts of your code, maybe with a short explanation what it does?
Otherwise I guess this task would be a little bit out of reach for my level of knowledge.

Did you also calculate the derivative of the motion equation (Bewegungsgleichung) to continously update the speed of the ball or is it moving with a constant velocity?

Thank you very much in advance!

Best regards
EDM1

Hy,

The Ball is moving only by the catapult and the vc internal (nvidia) physics-Engine! → I just fire the ball with the same parameters as I use for calculating the Curve…

It was a bit my target to compare the Physics Engine with the mathematic Fundamentals…

Regards
Feature

Hi,

do I get you right that the python script is just to calculate and draw the red line, but the actual path of the ball is calculated internally by PhysX?
Is the ball modeled as a physics entity with the physics type “in physics”?
Is the ball connected to or grasped by the catapult or is it just “lying there”?

Best regards
EDM1

Hy,

Jes!

Jes!

I every time “beam” the ball over the basket of the catapult, before I fire it! It is not connected or grasped, because then the ball would not fly. :wink:

Regards
Feature

Hy,

I don’t but this would be one way to do the same without using the internal Physics-engine and without the beautiful catapult… :wink: → But this was not my target!

Hmmm I don’t think you need to calculate the derivative of the equation because in this form you have clearly the Position of the Center of Mass from the ball over time which includes it’s velocity and influence from gravity?!

Without the amazing catapult and the Physics-engine would it not be possible to look at the physical effects when you try to catch the flying ball…

Regards
Feature

Hi,

thank you very much for your answer. Your hints guided me in the right direction!
I was able to modell something similar to your catapult with a robot.

Best regards,
EDM1

Hy,

you’re welcome. :slight_smile: Would you share your vcax too?

Regards
Feature