Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physics(Bullet3) #14

Open
LWSS opened this issue Jan 21, 2021 · 1 comment
Open

Physics(Bullet3) #14

LWSS opened this issue Jan 21, 2021 · 1 comment

Comments

@LWSS
Copy link
Contributor

LWSS commented Jan 21, 2021

This issue is dedicated to the Open Source bullet physics.

First off, the appropriate people should be credited:
https://github.com/DrChat/Gmod-vphysics/
https://github.com/dyanikoglu/source-sdk-bullet-physics

Known Issues

  • No Noises/Particles when bounced around on terrain( can't be done until the deactivation problem is fixed ) Deactivation thresholds changed back to bullet stock settings. Noises/Particles got fixed by making the simulation more accurate -- this was done by changing the maxSubSteps in stepSimulation(). ( Basically allows for smaller resolution steps when collisions happen
  • Small things like pistols can go through the floor sometimes This was also fixed by changing maxSubSteps
  • Things seem to move for too long after coming to a standstill, sometimes forever Fixed by changing sleep thresholds back to bullet stock settings
  • GetSimulationTime() impl needed for the ragdoll sleep after x seconds convar.
  • Getting stuck on the edges of various objects(boxes/crates/bricks) Fixed by changing raytrace TraceBox() thresholds
  • Objects are a bit above the terrain instead of appearing to rest directly on the terrain. Fixed by lowering collision margin in LedgeToConvex() on small objects.
  • Ragdolls are a little unstable. Sounds are currently disabled on them due to the massive amount of bone collisions. Ragdoll self-collisions have been disabled and sounds re-added CSGO also has a built-in hack to force them to sleep after 2 seconds. ( see convar ragdoll_sleepaftertime )
  • The friction sound is very lame, I changed it in csgo/scripts/game_sounds_physics.txt it takes some sort of .wav loop but it just sounds bad no matter what it's set to. I actually think the original one in csgo was broken(too quiet to hear)
  • Threading is experimental, tested a bit, seems that performance is better without it.

Physics overlay works.

Things like the swings on overpass kinda work ( unlike kisak-physics ).

Pros and Cons of BulletPhysics vs Kisak-Physics

Pros

  • Free license
  • Code is not from 1990s and has decent documentation, widespread usage, and is pretty clean.
  • Less crash-prone
  • More complex physics
  • Supports threads (although experimental)

Cons

  • Not the original CSGO physics engine
  • Performance can tank for a moment when changing rounds on maps with lots of props ( see mirage ) - This is mainly due to the position of all the physics props being reset and dropped to the ground via gravity. ( update: although recently I have noticed this occurs on retail csgo as well. )
  • Tunneling problem tradeoff vs performance ( see convar bt_max_world_substeps ). A value too low will allow pistols and small items to fly through walls at high speed, however a value too high will degrade performance when collisions occur.

Bullet Physics(old)

https://streamable.com/z5uf0f

Kisak Physics

https://streamable.com/8y2glq

@klaxons1
Copy link

Well, can your bullet be used in source-2013?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants