2,654 Commits over 1,399 Days - 0.08cph!
Use is valid checks in rigidbody
Fix index out of range accessing backing data collision attributes
Apply aggregate tags in C# instead of this massive inline bind function
PhysicsGroupDescription grabs physics tags from aggregate backing data so they can be string token cached. This allows trace result tags to be valid because they'll be reversable by string token
Set collision attributes on map instance collision shapes, I missed this out when switching from native aggregate instances
Restore skeleton compile to how it used to be, we're missing optimizations by just keeping every bone no matter what
Fix bug in capsule tracing, fixes picker in modeldoc when using capsules
Fix errors when first creating terrain, make sure it's all updated, don't render without storage
Only recreate clipmap if we have to, this takes time to build
Wake touching when disabling a body, why would we not want to?
Some games rely on map having a collider
CollisionEventSystem has less reliance on Collider
MapInstance uses SceneMap instead of Map so it can manage it's own collision. Build collision from physics group desc instead of using CreateAggregateInstance
Fix map collider destroying body when it shouldn't, causing a crash when map physics aggregate is destroyed
Don't allow zero quaternion in body transform, check against quat zero and use identity, if we find more invalid quaternions there's extra checks we can do
Use IsValid checks in AddShapeCollision, shape/body might have been removed from under us
Recreate mesh shape on update, this is the safe option until we get proper fixes
Clear triangle cache on mesh update to stop crashes until we get the proper fix
Range check UpdateMesh on the C# side instead so the user knows they fucked it
Do the same for UpdateMeshShape because this is likely where the crash is coming from (grubs)
Check BVH indexing outside of vertex list, if this is still getting hit then something else is at fault
Assert and bail when trying to set physics body to invalid transform
Don't allow mesh shapes to generate contacts on sensors
Oops, delta needs to be transformed by the rotation not the transform
Fix CastShapeAgainstShape for AABB
Fix physics builder stomping physics tags with material tags, they should just append
Support terrain collision holes (Use I8 instead of A8 image format for hole map), still need to refresh contacts on dirty though https://files.facepunch.com/layla/1b2111b1/sbox-dev_60iyvuYQ7S.mp4
Hull collider can be updated without recreating the physics shape
Use MakeDirty for model collider
Sphere collider can be resized without recreating the physics shape
Capsule collider can be resized without recreating the physics shape
Add internal functions for updating spheres, capsules and hulls
Plane collider can be resized without recreating the physics shape
Move this internal resize attribute to collider so I can make use of it for all the other colliders
Rebuild or update collider if they're a child of the rigidbody object and their local transform changed https://files.facepunch.com/layla/1b2111b1/sbox-dev_UFKO9q1Mrr.mp4
Fix hitbox adding box shape twice the size
Improve flatten tool, first stroke saves a plane to trace against to get flatten height and uv https://files.facepunch.com/layla/1b2011b1/sbox-dev_KIb8siErec.mp4
Update dirty collider region for heightfield materials
Don't cause a rebuild for mesh component when transform chances when scene is not editor
Remove hack from mesh component that is stopping hulls from being kinematic
No need to pin this memory anymore, height shape makes a copy of it
Update height collision region
Update height field without recreating the shape
Don't keep setting terrain collider to static if it's already static, this is causing an on dirty, don't dirty collider on heightmap region dirty, we should be able to update this faster
Add shapeless heightfield cast for Terrain.RayIntersects
Box collider rescales without rebuilding the shape
Wake connected here too for good measure
Don't dirty box collider on size change, update the hull instead - fixes trigger enter/leave when resizing
Add internal UpdateBoxShape, box collider will use it
Update mesh shape by updating the BVH instead of recreating the whole shape
Turn on trace solver again, looks like it performs much better
Use worldspace cloud here for the obstacle, it's always identity so no need to transform it
Clear velocity internally when disabling motion
We can't assume rigidbodies are static when motion is disabled, people are using them for kinematic platforms