Animating Your Avatar In VR

Update:

Looking straight down before switching to third-person only seems to fix the issue if I’m sitting down in real life. If I’m standing, the bug persists in third-person no matter what direction I’m looking.

Also, this bug seems to be caused by VRService.AutomaticScaling. Turning off AutomaticScaling in third-person seemed to fix the problem entirely.


Another bug I discovered:

If you’re in first-person and you push in on the left thumbstick to recenter the camera, you will be completely unable to rotate your avatar in third-person (and in first-person, if VRService.AvatarGestures later gets disabled).

This is because, with AvatarGestures enabled, Humanoid.AutoRotate is automatically set to false in first-person, and goes back to true in third-person. However, for whatever reason, if you recenter the camera in first-person, Humanoid.AutoRotate will no longer automatically change, and it will stay false forever.

Humanoid.AutoRotate also does not get re-enabled if you disable AvatarGestures while in first-person, and likewise, it does not get disabled if you enable AvatarGestures while in first-person.


Here’s some code I wrote as a workaround until these issues are actually fixed:

Code
local userGameSettings = UserSettings():GetService("UserGameSettings")
local vrService = game:GetService("VRService")
local camera = workspace.CurrentCamera
local hum = nil --put your humanoid here...

--toggle AutomaticScaling and AutoRotate dependent on camera modes, to fix bugs with AvatarGestures
local function fixAvatarGestures()
	local rotationType = userGameSettings.RotationType.Name
	
	--third-person
	if (rotationType == "MovementRelative") then
		vrService.AutomaticScaling = Enum.VRScaling.Off
		camera.HeadScale = 1
		
		if hum then
			hum.AutoRotate = true
		end
		
	--first-person
	elseif (rotationType == "CameraRelative") then
		vrService.AutomaticScaling = Enum.VRScaling.World
		
		if hum then
			hum.AutoRotate = (vrService.AvatarGestures==false)
		end
	end
end

--fire when you change camera modes or toggle AvatarGestures
userGameSettings:GetPropertyChangedSignal("RotationType"):Connect(fixAvatarGestures)
vrService:GetPropertyChangedSignal("AvatarGestures"):Connect(fixAvatarGestures)

--immediately disable AutomaticScaling since you initially spawn in third-person
fixAvatarGestures()
3 Likes

Here’s a few issues I’ve noticed.

  1. Character shakes while in a moving vehicle
  2. Character’s arms shake when the headset shakes
  3. part.touch buttons don’t work when the character is sitting.
1 Like

FYI, it seems like these added parts / IK controls break many vehicle controls. Do you have any reports of this?

Today, I tried out this feature! I do like how close this feels to Nexus VR Character Model in terms of how the hands move and follow my controllers, but…that’s the main positive I have…

I don’t like how VR starts in third person by default. I could fix it by setting the player’s Camera Mode to “locked first person”, but it’s an odd default, considering how immersive VR can be when you feel like you are the character in an experience.

Also, face, hair, and hat accessories shouldn’t be visible in first-person. I love how I can see the rest of my body and arms when I look down instead of the weird “floating hands” games and Meta’s link UI use. I tried writing a script to hide all accessories by setting their LocalTransparencyModifier property to 1, but my hat and button nose wouldn’t get out of my face!

Lastly, if your character moves at all while you aren’t directly controlling them using the left analog stick, you stop following your character, and they slide back to you, which could really mess up any gameplay mechanic or move that needs to move the player, or experiences where characters have momentum like mine.

Here’s a short video of this weird bug:


(This is the same bug @TheNexusAvenger reported earlier in this topic, but it could be really disruptive and break people’s experiences.)

4 Likes

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.