Download

Popping/Vanishing physical object - Absolutely stumped

I’ve been working on coding a dynamic drag system for a project I’m working on and it seems to work fine till I start trying to work with the relative lateral velocity. At this point any sudden change in direction causes the vehicle to suddenly accelerate and vanish. It seems to work just fine longitudinally (forward and backwards) but it crashes when I attempt to do lateral movement. Sometimes it is even failing hard enough to crash the whole program. I’ll link a couple of the error codes being spit out by it. Also for the record i’m using the add force command for this.

I am aware it says to enable simulate physics but that’s the strange part as it is already.

Can see it working as it should here:

And this is after adding the lateral component and you can see it vanishing as soon as I reverse the turn

The camera’s jumping too, right?

The physics message do indicate that somewhere there is a mesh that needs it enabling.

That is the strange part, the mesh has physics enabled, that’s how it is moving. It just poofs like in the gif when the horizontal direction is changed by either dragging it back and forth in simulation or reversing the turn. It does not error as long as no lateral changes in velocity are introduced.

So update on trying to chase this issue. I am using a basic exponential function to apply the force for the drag right now. I noticed if I removed an extra multiplier it seemed to work better but still break. I have tried running it as a linear and even a s curve and it doesn’t fail. Is it possible I am attempting to add too much force? Anyways here is what the math looks like. Screenshot - 78ee7d0c64acf8dc41b828bfd1095a26 - Gyazo

It does sound / look that way.

I solved it, I was using the wrong approach to localize the velocities so it was giving ironious data and basically exceeding the engine’s limits. I’ve solved it now thankfully so now it’s just on to fixing the angular physics and then maybe i can start on making something that looks more like a playable game lol