Fully Physics-Based Body in VR, everything is handled through forces and joints including the roomscale movement and the arms.
Nice i hope you add avatar accessories to it.
Try using skinned meshes with this, that would be pretty big
How did you do the roomscale movement? I cant figure it out & im stumped
Head movement is transferred into acceleration, in which I apply this as a force to my physics body, on top of this I also have a PD controller which I use for friction, and I apply the head velocity as the target velocity. This would only really work well if you are using a hover rig
This looks very cool and nice! Good job on it! Did you make it all yourself?
Yes, I transferred a lot of my experience from Unity into Roblox and was able to make this
Could you provide an example / in depth explanation?
So using the position of the HMD/Head in roomscale space, I calculate both the velocity and the acceleration of it. And with acceleration, I apply that as a force onto the player rig (only the x and z axis). And because I’m doing a (hover rig) meaning the actual physics player is hovering above the ground at all times, I simulate friction on my own using only the derivate part of a PD controller, which takes in a target velocity which I set that as the head velocity (only x and z axis). If you’re using a (locomotion sphere) for physics-based movement, you’ll have to use torque instead
I’m probably just being dumb, but how does using velocity & accel account for if your up against a wall ingame but then walk towards the wall IRL? (I’m not very good at stuff like this, I feel like I’m asking too much but could you give a simpler in-depth explanation with code snippets to help me understand? Sorry.)
Edit: I’m using ball locomotion like boneworks (one ball moves + another “fender” ontop to stop wall riding issues)
When you get the HMD/Head input, you get the position of it relative to your playspace IRL, so 0,0,0 would be the center of your playspace. But we don’t really care about where we are in the playspace, instead we just want the change in position (velocity) and the change in velocity (acceleration) so we can use this to apply forces to our physics rig in the correct way so that we move in-game 1:1 with our IRL movement. I don’t understand what you mean with the wall part, but I see you’re using the locomotion sphere similar to Boneworks, and this makes roomscale movement a little bit difficult because the forces we apply on our player will get overridden due to the friction forces that the physics engine applies, which will make roomscale movement not 1:1 in-game. Instead you’d want to convert the head movement into torque which will roll the ball at the right speed to account for the head movement.
For the wall part I mean when your character is against the wall ingame then you walk into that wall IRL, Will your character now be offset when you move your character away? Also do I need to do any conversion on the force value for the rotation of the ball?
It depends on how you’re character system works. it will never get offset if you’re camera is directly on top of the locomotion sphere, which it should be in the first place. And yes I believe there’s a conversion when turning forces into torques
If you don’t mind could you provide the basic setup of a hover rig? as it seems easier other than the PID for the friction, as my camera is locked to the root part (the thing that holds the locomotion sphere) & I’m guessing I would have to Offset based on the head movement which may cause other problems.
Edit: & that it would allow for easy physics interactions as it slides
Ok well I’m trying the ball route, what’s the math for the combination of the velocity & acceleration?
Edit: TYSM FOR THE HELP! Wouldn’t be here without you, it is surprisingly difficult to find this info.
& Turns out its just Velocity For the ball. Hopefully this will save future people from pain.
I actually have never been able to successfully get roomscale movement working with the ball route, can’t figure out the conversion. However the basic setup for a hover rig is like this, you first raycast down from a part, and get the height of the intersection, then the force formula for it is:
Vector3.yAxis * (spring * ((raypoint + targetheight) - partheight) + damper * (0 - part.AssemblyLinearVelocity.y))
My ball is just this:
LocoSphere:FindFirstChild("BodyAngularVelocity").AngularVelocity = Vector3.new(Velocity.Z*1, 0, Velocity.X*-1)
Then I just add the joystick Vector after.
Edit: Again, Ty for the help!