I’m working on a virtual reality game that is physics based. I have the character almost finished except I’m having issues with the physics. The current way my character works is by changing the CFrame position by teleporting the hand to the new CFrame but it doesn’t allow momentum to be conserved when pushing off of objects. Here is a video :
I have 0 experience with vr but if your input is that arms position and you want the player to rotate when they press like w or smth you could use like rotational matrices ig to have it move their camera up along the x axis when they are holding w and y axis if they are holding a where the radian is ig a interval which goes up from 0. (Perhaps a delta time check?)
I feel kinda lazy to supply the code but I had to do this for a ray tracer I made in the past (fancy names dont worry about it). While testing it I made this model in demsos I hope it helps you
The wikipedia of rotational matrices also has really good info on 3d rotations with pretty much what I would say imo are copy and paste code as its literally just pseudo code.
TL:DR - from what I see from the game getting over it its 2d based so its using a 2d rotational matrix to rotate the player about the collision of the hammer as the vertex. In a sense the origin is the collision point. To do this in code you will need to use a matrix transform to offset it.
I kinda suck at writing so let me re explain. I have the VR scripts finished and I’m looking for a way to allow the hands to push the character off the ground (ignore friction for now). Would i use tween service or something else like a linear constraint to push the character off the ground? Currently the vr scripts repositions the hands by teleporting them.
Just tried the SpringConstraint for 3 hours and no progress, the closest thing I got was making the spring with a limit of 3. The only issue is that if you move too quickly it starts the bug out the player and in VR that is a huge issue. Any other ideas?