|
| 27 Dec 2015 11:32 AM |
I'm using CameraOffset to make the third person camera, but the problem is that it easily allows players to see through walls, which is a huge problem. Anyone know how I can prevent this? I was thinking about placing an invisible part where the camera is offsetted at, and if the invisible [art touches and other bricks then the camera offset will adjust the offset based on how far the invisible part goes through the wall. However, this seems inefficient and complicated. If you want to see the problem yourself: http://www.roblox.com/games/335498567/Camera-Testing |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 11:34 AM |
Whoops, I had a lot of typos so here is the new one:
I'm using CameraOffset to make the third person camera, but the problem is that it easily allows players to see through walls, which is a huge problem. Anyone know how I can prevent this? I was thinking about placing an invisible part where the camera is offsetted at, and if the invisible part touches other bricks then the camera will adjust the offset based on how far the invisible part goes through the wall. However, this seems inefficient and complicated. If you want to see the problem yourself: http://www.roblox.com/games/335498567/Camera-Testing |
|
|
| Report Abuse |
|
|
| |
|
error9999
|
  |
| Joined: 05 Sep 2009 |
| Total Posts: 1593 |
|
|
| 27 Dec 2015 12:28 PM |
| Cast a ray from the camera position to the player's head, then if there is a part between, make the camera zoom until there isn't one. |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 12:29 PM |
are you talking about this?
https://gyazo.com/3e31d408a26bad54aa88876f8e4b9b64 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 12:51 PM |
If you turn your body 90 degrees against the wall then the camera will go right through the wall.
Here's a picture: https://gyazo.com/38b0083748bf4e3d10624e2e1120de62 |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 12:52 PM |
| But I'm going to try error's method. |
|
|
| Report Abuse |
|
|