This is a repost from SH, but I wasn’t sure if I could get any help from there and I need to get this done as soon as I can since class starts up next week (I believe) and I want to finish my vr game.
So, I need help with characters and vr. It’s not all related to VR, but it may help if you know that I’m making a VR script.
I need to make the character turn like Shift Lock (but in RVR.) so it will move correctly.
I’ve already tried changing the CFrame, for rotating, but it makes movement near impossible. Right now i’m using a BodyGyro, but it causes the character to spin too much. I’ve tried everything, but i’ve given up. I really hope that its not super simple and i’m just being stupid lol
Some of the code im using for the body rotation (in a RemoteEvent Fire in a ServerScript connected to a RenderStepped in a LocalScript):
Head.CFrame = (cam*CFrame.new(head.p*2))*CFrame.fromEulerAnglesXYZ(head:ToEulerAnglesXYZ()) -- this is for roblox vr's head movement, it will attach a custom head to the vr headset.
look = Head.Orientation
Gyro.CFrame = CFrame.new() * CFrame.Angles(0,math.rad(look.Y),0) -- this is causing the player to end up spinning out of control. it turns more when you turn the headset more (left or right.)
If you’ve got a vr headset and you want to see whats happening (in action) Play this:
Once again, I’d be VERY greatful for somebody to help me, i’m so confused.
Thank you!
god please save me
i want to have a working vr module