@DRLeria I don’t think you need to try and calculate the effects of gravity, because the scene has gravity, and we know the imposter already has a mass, so if you do a getLinearVelocityToRef to get the y component from the current velocity before we modify it on key press, and just preserve that, the engine will do all the work of incrementing and decrementing based on our dampening etc.
I did exactly what you just did a few hours ago trying to figure this out great minds!
I still think we have more work to do should we be using setLinearVelocity or applyForce?
Impulse is an explosion, force is persistent more like movement, maybe what we’re doing is a bit of a lucky hack?
An elaborate hack but it works, which is the important thing.
let’s wait for @Cedric opinion, he is our PhysicsGod
Can’t tell if @voyile34 is a bot or just GPT’ed the response “gear” link only slightly suspicious
I would also use a raycast to check if on ground or not. Then play with linearvelocity/angularVelocity. This said, I’m adding a player controller in the Physics roadmap. It’s something important we didn’t have the chance to push for the 6.0 release.
Thanks Cedric, good to get a high council view on this sort of thing, the setting linear velocity wiping out any gravity that had been applied was what was killing us off I think, the ray-cast is the icing on the cake I think we needed.