VPhysics-Jolt icon indicating copy to clipboard operation
VPhysics-Jolt copied to clipboard

Collision issue cause problems with many addons, including LFS, Simfphys, ect.

Open JokerR3310 opened this issue 2 years ago • 2 comments

55555579-=98-89 Both props are set to no-collide with each other, but still continue to interact with each other

the higher the speed the more times they interact with each other, this problem affect not only addons, but anything that uses no-collide.

this problem is also most likely to cause this behavior:

https://steamcommunity.com/sharedfiles/filedetails/?id=2857489430

Main problem: https://github.com/Joshua-Ashton/VPhysics-Jolt/issues/86 https://github.com/Joshua-Ashton/VPhysics-Jolt/issues/28

LFS, Simfphys and other: https://github.com/Joshua-Ashton/VPhysics-Jolt/issues/87 https://github.com/Joshua-Ashton/VPhysics-Jolt/issues/75 https://github.com/Joshua-Ashton/VPhysics-Jolt/issues/55 https://github.com/Joshua-Ashton/VPhysics-Jolt/issues/50 https://github.com/Joshua-Ashton/VPhysics-Jolt/issues/48 https://github.com/Joshua-Ashton/VPhysics-Jolt/issues/30

JokerR3310 avatar Sep 10 '22 18:09 JokerR3310

How to fix that?

Novar256 avatar Oct 10 '22 21:10 Novar256

How to fix that?

Wait for a new release, or fix it in the code.

QuoniamVR avatar Oct 22 '22 18:10 QuoniamVR

Simfphys/LFS author has created a successor that likely solves this issue https://steamcommunity.com/sharedfiles/filedetails/?id=2912816023

ghost avatar Jan 07 '23 19:01 ghost

I've tried to read the code for half a day, and I came to some conclusions. I'm not familiar with both VPhysics-Jolt and Jolt Physics, so they might be wrong.

The GMod's no collide constraint is made with logic_collision_pair, what it does is add an object hash pair into IPhysicsObjectHashPair (JoltPhysicsObjectHashPair). The VPhysics-Jolt itself doesn't use it at all, it only provides it.

Inside GMod, I can only guess it uses this inside its solver's ShouldCollide. The solver does get called, but there's a problem. Its result doesn't seem to be passed to Jolt Physics. It's being ignored.

As a result, Jolt Physics doesn't know about this, causing the issue.

About the reason for not using the result, I don't know exactly. I can't fix and test it since I don't know much about these things.

YUCLing avatar Jul 25 '23 12:07 YUCLing

I have high hopes for this https://github.com/miguelmazetto/gmod_better_vphysics

JokerR3310 avatar Jul 25 '23 17:07 JokerR3310

Should be fixed now, previously ShouldCollide was not being respected when linear cast was used.

misyltoad avatar Aug 01 '23 02:08 misyltoad

Also I do not know why you would have high hopes for the exact same physics engine.

The flaws with IVP are pretty fundamental with it's solver and will not be solved by some dude importing a vector math library and trying to optimize things that are not the problem.

misyltoad avatar Aug 01 '23 02:08 misyltoad

Also I do not know why you would have high hopes for the exact same physics engine.

The flaws with IVP are pretty fundamental with it's solver and will not be solved by some dude importing a vector math library and trying to optimize things that are not the problem.

in such old and ancient engine that based on hundreds hacks and patches just to make it work somehow, it's all about people and ideas, the more people working on something the better for the community. At least He claiming that it will be "original physics engine with performance improvements" with is still milion% better that the original gmod physics if true. But dont get me wrong, you did an amazing job. I still believe one day we will have almost perfect vphysics replica that will allow server owners to unlock true power of modern CPU for server with high amount of players to enjoy without all existing today problems.

JokerR3310 avatar Aug 01 '23 12:08 JokerR3310