Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with Roblox VR (Custom?) Character

Asked by 4 years ago

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:

https://www.roblox.com/games/5566609121/VR-Testing

Once again, I'd be VERY greatful for somebody to help me, i'm so confused. Thank you!

0
I've posted about this on the devforum in hopes that I can get an answer. Feel free to answer on here if you'd like. (https://devforum.roblox.com/t/help-with-roblox-vr-custom-character-rotation/730231) GAM3RBOY2008 0 — 4y

Answer this question