Physics air walking

@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 :joy: great minds!

2 Likes

Share a Playground please :pray: :pray: :pray:

[EDIT]

I got it :grin: :grin:
Thanks for the solution :vulcan_salute: :vulcan_salute: :vulcan_salute:

I still think we have more work to do :joy: 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?

1 Like

Suee

An elaborate hack but it works, which is the important thing.

let’s wait for @Cedric opinion, he is our PhysicsGod :raised_hands::raised_hands::raised_hands:

Can’t tell if @voyile34 is a bot or just GPT’ed the response :upside_down_face: “gear” link only slightly suspicious

LOL!!! :rofl: :rofl: :rofl:

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.

2 Likes

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.

1 Like