branchrust_reboot/main/PhysicsLayerRevamp/RagdollRewrite2cancel
70 Commits over 184 Days - 0.02cph!
Merge main -> RagdollRewrite2
Proto, Protocol, Manifest
Merge main -> RagdollRewrite2
Scrap heli, parent ragdolls
Interpolation edit, no longer need the fancy stuff
Manifest again, to fix scrap heli
Enable ragdoll -> vehicledetailed physics collision
A rather difficult merge. Main -> RagdollRewrite2 (server-side ragdolls)
Pass the players model state as well as flags when evaluating which bone position data to pick
Added climbing, ducking and swimming
Fixed eye transform missing on new ragdoll, causing death cam to not move with ragdoll
Adjusted eye transform slightly so that it doesn't clip through geometry as much (is still clipping a bit, needs some work)
Implemented a fixed offset to the sleeper pose to fix the incorrect rotation. Why do sleepers need this but no other poses do?
PlayerBonePositionDataEditor inspector - put the button at the top.
Fixed ragdoll incorrect orientation on death on server. Use eye.bodyRotation for the ragdoll spawn instead of transform.rotation.
Use transform.position when updating train position, instead of rigidbody.position or rigidbody.MovePosition. I discovered only transform.position correctly moves parented rigidbodies (like ragdolls) along with the train as if they're in local space. THIS FIXES RAGDOLLS FLYING OFF.
My collider changes messed with the scrap heli inertia tensor. Manually set it to the old, known-good values.
Further cleanup of scrap heli
Forgot to save the latest prefab
Rebuilt the collision setup for the scrap heli, using all convex colliders. This allows ragdolls and items to collide with all parts of the mesh. Made a few new convex mesh colliders to help build it.
A corpse init order that works for both client and server-side ragdolls, but this is very weird and needs investigating further
Minor edit, don't need to use euler here
Don't call SetupRigidBody if the corpse is the rigidbody
PlayerBonePositionData now supports loading bone position data from any specific point in any animation. Updated current data.
Fixed incorrect joint behaviour in ragdoll due to init order changes
Fixed incorrect offset for initial corpse limb positioning on server.
Merge Main -> RagdollRewrite2
Working on fixing pelvis offset troubles and fixing the jitter at initial spawn
Fixed arm positions not being set. Some bones were null, and blocking subsequent ones from being set.
If corpse is an old-style corpse, still spawn it at the player's centre point instead of at their feet. + some debug tidy-up
New system to handle the server having no info on the position of a player's limbs:
- Server saves a player's PlayerFlags just before death resets them, and passes them into the corpse.
- PlayerCorpse looks at them and infers whether they should be standing, crawling, sleeping etc.
- Corpse then selects from a set of new scriptableobjects storing bone position data, and copies that bone data into the new ragdoll, getting the server's ragdoll starting position much closer to what will most likely be happening on the client.
Corpse prefab bone structure fixes
Fixed pelvis shenanigans, reverted to original ragdoll style. I didn't originally realise that the pelvis isn't always at 0,0,0 (e.g. when crawling)
Reset pelvis offset on server-side ragdoll creation
Lerp experiment. Initial 500ms lerp from the client's final position to the server's data.
Various bits, moving some changes to RagdollRewrite2
No need to call CopyBonesFrom if the corpse is the ragdoll
Buoyancy adjust to match old behaviour
Set up ragdoll buoyancy. Update arrays.
Increased ragdoll solver iterations to decrease jitter
Fixed ragdolls still sinking into vehicles a bit as the vehicle moved (most visible via scrap heli ascending with ragdoll in the back). Was caused by still have rigidbody interpolation on on the ragdoll when doing server-side simulation, which was giving it a slight delay.
Revert accidental TriggerParent change
Removed DoMovingWithoutARigidBodyCheck method from BaseEntity.Server. This was unused and hasn't been an issue since Unity 5.
Match corpse position sync parameters to vehicle position sync parameters. Keeps corpse world position properly in sync when on a moving vehicle. Since limb positions are local, we can get away with updating them less often - keeping the base position accurately in sync is enough.
Manifest rebuild after merge
Merge Main -> RagdollRewrite2