Cancel gravity via Add Force does not work

I guess you are missing the mass of your cube. Multiplying the force vector by the mass should put you in the right ball park, but I doubt this is the best way to go about cancelling gravity. Floating point inaccuracies and asynchronous updates will probably just result in a very jittery experience.

I’m at a loss as to why this very simple blueprint is not working. The only component in this blueprint is the EditorCube static mesh. I have enabled physics for this mesh and it works as expected during simulation. I have added the attached Tick event to the blueprint which adds a force of (0, 0, 980) to the cube. This does not cancel out the default (0, 0, -980) gravity like I would expect. The cube still falls to the ground. What am I missing here?

6821-2014-05-22+12_39_21-localhost+-+remote+desktop+connection+manager+v2.2.png

That did it! I tried multiplying by mass before but it was a separate problem that is throwing me off. Objects seem to be given some initial downward force at the start of simulation that I’m having a hard time negating.

You’re right – this is not the best way to change gravity but I’m doing this primarily to understand the physics system better. If you post this as an answer I can mark it accepted!

The initial downward force comes from the fact that we tick the physics simulation a few times at the very beginning to build the broad phase. This is not a great solution as it means that we will tick the physics simulation for about 0.6 seconds before actually ticking blueprint and the rest of the engine.

There is a solution planned for this but I haven’t gotten around to it yet, thanks for reminding me!

One temporary solution is to turn the physics simulation on after a delay. This is obviously not a good solution, but should work for now until we get the other issue resolved.

I figured as much and my temporary solution is to uncheck the “start awake” checkbox. The AddForce wakes the mesh up once blueprint physics fire and it doesn’t get the 0.6 seconds of gravity.

If the engine disabled gravity during those initial 0.6 seconds that might be a good workaround, since the problem is “mysterious” initial force due to gravity. Thanks for following up!