different force in the viewport and standalone

The gamemode code simulates attraction. To create a supposedly solar system, I create a heavy sun and 1 planet. So that she doesn’t just fall into the sun, I give her a boost (addforce). Everything is great in the viewport, but in standalone mode, gravity acts on the planet weaker and it flies away. What is the problem? code from the video “Gravity Simulation in Unreal Engine 5”

I realized that it’s about add force. For some reason, the speed varies in different modes. How can I fix this?


(post deleted by author)

Well, I do not know why, but the add force node works with different strengths even in its pure form. The solution was node add impulse-there is no such problem here

You are adding force in ticks. Standalone mode is often slower than PIE, so you tick less often = less force. And it would be different in a packaged game because it’d run faster with higher FPS. Meaning the method you are using to add force is tied to framerate.

1 Like