Shift lock issue

Little issue that I’ve noticed since the start of 2018. When on the right side of the character, while using shift lock your camera is able to pass through walls, looking into other rooms, or outside of buildings. In my case as shown in the image, the camera passes through the entirity of my bottom floor. For reference purposes this part of the floor isnt hollow and is a solid brick, yet through the players camera you are still able to view through it. If anyone else has encountered this and has a solution to it im open to suggestions. I’ve tried seperate layers and unions but havent had any luck. In addition the game is shift lock enabled (not my decision).

5 Likes

You can disable shift-lock by inserting a script in your game, all you need is this one line.

game.StarterPlayer.EnableMouseLockOption = false

If your game is forced to you use shift-lock… (wasn’t too sure on what you meant at the end of your post)
you can just try and have a slightly transparent blocks that players can’t zoom out of (transparency .95)

2 Likes

Much appreciated for your reply, I’ll be sure to give it a try :slight_smile:!

1 Like

Wym inserting a script? StarterPlayer is an object in the explorer. Seems unnecessary. Img

Or if the game requires the player to choose between mouse lock or not, you could weld a part onto the player’s arm that can collide.

I did not know we had the option to do this :doh:

It would be cool if the camera would just bounce off the walls.
Shift lock is quite important in some kind of games.

1 Like

Please file a feature request for that, this is in Development Support.

You may also make the wall more wider, it’ll help with preventing being able to see through walls!

1 Like

This been a known issue with shift-lock, it happens because of the c-framed offset your camera gets and it basically forces it self into the wall. This bothered me so much that I made my own third-person over the shoulder camera. I explained it here

https://twitter.com/GhettoMilkMan/status/935406528261062656

1 Like

I would make the walls thicker, if anything just disable the ability to use “Shift Lock” in the players category. But great insight

I sometimes at the cost of 4 parts create a dark black small room, surrounding the wall that I need players to not see through.

That or you could raycast the camera, and create a black screen GUI.

Add a script in the server script service

1 Like

What has usually helped me out in this kind of case, is to fill the empty room, and duplicate it by using ctrl + D, and move the duplicated brick by a stud.

Hope that helps!

1 Like