VR gun's slide doesn't have proper constraint limits on client

I’m working on a VR gun system, it uses the Avatar Gestures feature. The guns are set up in 2 parts, one slide and then the base of the gun, they are connected with one PrismaticConstraint that doesn’t allow it to come off the gun.

On the server end, the constraints work perfectly, the slide doesn’t come off the gun and it works as intended.

On the client side, the whole slide comes off and the constraints limits do not work as intended.

The VR user has network ownership of the gun and their hands. The hands are the TrackedLeftHand and TrackedRightHand, they are created when the Avatar Gestures feature is enabled. Rigidity is turned off on the AlignOrientations and AlignPositions of the hands.

On the right side of this video, this is how other players see the VR user, which is also what the server sees. The left side is what the client sees.

The client should have limits of what the right side of the screen has, and the slide should not be able to be pulled further than the limits of the Prismatic constraint.

I am willing to make a replica place file of the VR gun if needed.

Any help given is greatly appreciated, and I’d thank you very much if you’d be able to help me find a solution for it.

3 Likes

I’ve made a quick replica of the issue in a place file, if anything is not working or not accurate to the video, let me know so i can fix it.

vrgunreplica.rbxl (136.1 KB)

You can replicate this by grabbing the gun, and then the slide (you’ll have to grab it from it’s edge, because it has an issue of grabbing the gun, and the slide with one hand)

1 Like