I am including a place file of the base coding for the game so more people can make vr games like sked or vr hands.
Quick note: when first playing the demo you will be forced into vr mode (even without
a vr headset). This is due to a variable in the local script (this can be found in starterplayerscripts) called pcdebug at the top, set this to false for normal non vr playing.
Detect when the players grip/ trigger button goes past a certain threshold, and when it does fire a remote event telling the server that the grip button is down.
From the server you weld the object (or apply a continuous force) to the hand.
Note: welding probably isn’t the best solution since the body relys on network ownership, but this shouldn’t be an issue if you set the objects network owner to the player.
function GetTouchingParts(Part)
local Connection = Part.Touched:Connect(function() end)
local Touching = Part:GetTouchingParts()
return Touching
end
A function like this should get anything inside/touching the part. If you use this code make sure to have a separate hitbox (preferably a sphere at the tip of the hand), just so the player doesn’t grab objects from the very back of the hand.
Another solution is to loop through every part / player and check to see if they’re close enough (though this could create some performance issues with a lot of players/parts).
Hi, love the demo. Big question, things like keyboard don’t seem to work. I’m an oculus rift s user, and none of the buttons seem to actually click anything on the keyboard. Triggers and grip doesnt work, either. Know anything about this?
Thanks one more question I made a tutorial with this place (I credited you) I made an adjustment that If VRenabled is false it destroys the scripts for VR and the people not on VR cannot see VR players could you give me any pointers on why this may be?
I didn’t include gripping or the keyboard in the place file.
Gripping wasn’t originally in the base coding and the keyboard was custom code that I’m still working out.
It’s pretty buggy so it’s definitely not going to be getting releases for awhile roblox vr chat - YouTube more information on the kb
Also if you were talking about the game and not the place-file then I have no idea what to say.
What about VR Climbing because I’ve been trying to make VR Climbing for that past day and still haven’t figured it out. Do you have an idea on how to do it?
Alright, many people have told me to use Align Position’s with the Reaction Force property enabled. But every time I try that it either ends up with me flying or just does nothing.
Talking about gripping, I recently encountered your VR modules, and I really liked them! They were easy to edit and I decided to experiment on it.
I decided to go by myself and add a grip feature, it was mapped for Oculus Quest 2 controllers but might work for other devices. I also added a trigger input for specific items like a Soda can and I added hit detection for the VR arms.
The method I used to do those inputs are really mediocre though… but it gets the job done!
I won’t do any tutorial on how to use my scripts in the place as I am way to lazy to do it. You can easily figure out how to edit the script by taking a look at it.
I’m not the best scripter but maybe you could use a system like whenever the climb button is down it checks to see if your touching a climable wall or part and puts an anchored part there and welds to the hand until the button input stops.
That part I figured out, but that part I’ve been struggling on is actually making my entire body move and be able to actually “climb”. And to be able to lift myself up ledges.