branchsbox-scenestaging/maincancel
71 Commits over 427 Days - 0.01cph!
Use WorldTransform/LocalTransform
Make ragdoll components NotEditable in IsEditor
Rebuild ragdoll if bones change (model reload)
Auto populate ragdoll renderer and model on awake if none are set
Add Ragdoll.StartAsleep, put to sleep on first update because joints are created in OnStart so sleeping has to happen after that
Set these hidden flags on creation too
Add properties to ragdoll to show rigidbodies, colliders, joints
Use large plane for water
Always create ragdoll bodies at the saved gameobject transform unless the bone has just been created, allows for ragdoll posing in editor https://files.facepunch.com/layla/1b0311b1/sbox-dev_pSeZ9ABT7i.mp4
Remove Ragdoll.DriveFromAnimation, active ragdoll stuff should be a component on top
Simplify mirror component, use fixed render target size to show that we can
Fix the conveyor belt in player_controller_physics
Update ragdoll bone objects in editor
Ragdoll uses Model.CreateBoneObjects
Include bodies in ragdoll joint record
Add read only lists for ragdoll bodies and joints
Drive ragdoll physics from animation in fixed update
Add option to ragdoll to drive physics from animation https://files.facepunch.com/layla/1b2211b1/sbox-dev_zcC1rx2gSM.mp4
Ragdoll child component flags are not saved and not cloned, they always get recreated OnEnabled
Flag ragdoll body bones as bone, because they are
Scale ragdoll joint local frames later on
Set ragdoll attachment mode and local frames on all joints
Setup hinge motor on ragdoll (needs testing)
Setup fixed joint frequency and damping on ragdoll
Setup slider joint limits on ragdoll
Save ragdoll child objects so things can be attached to them in editor
Update Conveyor component to set collider surface velocity, this component doesn't really need to exist anymore though
Conveyor shouldn't use static collider
Move mirror component to work in progress
Fix all deprecation warnings
Drive kinematic ragdoll parts with smooth move to the animated bone transform
Ragdoll smooth moves kinematic rigidbodies to renderer bone, as an added benefit it means we don't need to calculate bone velocities, the rigidbody already has it when switching to dynamic
These floors should be static in physics_simple scene
Add IgnoreRoot to ragdoll, mostly so I can test motion enable toggle, needs better name
Set ragdoll transform to root body transform. Use absolute flag for child rigidbodies so parent transform doesn't fuck them
Parts have linear and angular damping, so use them
Dynamic joint scaling https://files.facepunch.com/layla/1b1311b1/sbox-dev_8tUelwOLEE.mp4
Scale ragdoll joint local frames by body world scale
Add motion enabled support to ragdoll, motion disabled drives kinematic bodies using render bones https://files.facepunch.com/layla/1b1211b1/sbox-dev_x0MIf0ioIl.mp4
Destroy physics on ragdoll destroy too
Clear physics bones when switching out renderer
Add rigidbody flags to ragdoll
Add physics lock to ragdoll
Use renderer bone transform to set up ragdoll rigid bodies if they exist https://files.facepunch.com/layla/1b1211b1/sbox-dev_Rr8wJCrHB6.mp4
Joint desc limits are in degrees
Set ragdoll collider surfaces
Add work in progress ragdoll component that creates child rigid bodies from model physics https://files.facepunch.com/layla/1b1211b1/sbox-dev_CS4vIaEj8o.mp4
Add mirror example component, this isn't ready to be used in games, it's for us to debug rendering issues
Use !IsValid instead of == null or is null for any IValid