#My Character broke his neck trying to make the head look at where the camera is looking

1 messages · Page 1 of 1 (latest)

rose mist
#

I made it replicated to all clients, but he keeps breaking his neck.
I think I got the wrong vectors for it.
Here is some of the code(and yes I want to do this with :Lerp())

local LookVector = HRP.CFrame:ToObjectSpace(CameraTable.CFrame).LookVector

        
        HeadTilt = HeadTilt:Lerp(CFrame.Angles( LookVector.Y,-LookVector.X,0), 0.2 ^ (1 / (Delta * 60))) -- x front, y right
        Neck0.C0 = CFrame.new(Neck0.C0.Position) * HeadTilt
        
        if CameraTable ~= nil then
            CameraTable.NeckTilt = HeadTilt
            CameraTable.PreviousC0 = Neck0Previous
        end```
CameraTable is where I store the previous Rotations and it make them smoother
So how would I fix this( I tried tutorials from youtube, but my character still ended with a broken neck)\
rose mist
#

Im just going to scrap that idea for now

ripe ginkgo
#

You don't need to touch the motor 6d.

#

Just play around with the head rotation