Walls disappear when close.

Im trying to get my settings back now since I have moved to version 3.05, but Im having an issue when the player gets close to a wall it just vanishes. Not really a fade and obstructing objects fade in the object fader is off. What am I missing? Thanks in advanced.
 
Ok I set Collision Radius to -1 in the camera controller script and that stopped the wall from vanishing. But I can still walk up to the wall and zoom in and see the next room.
 
During my messing around with this I have a new issue, the player can be walking and just seems to hit colliders in rooms that arent there. I can create a new character and just leave the basic settings and they work fine. But I have a few hours in on setting up the character I had, and if I do this process again I might repeat it. I have added new colliders and removed the old and set back all the UCC settings to default and still walks into invisible objects or steps up onto non exising objects. Any ideas?
 

Justin

Administrator
Staff member
I am not really following. What do you mean the wall disappears? Is it that the camera moves through the collider? The GameObject is disabled? The material is changed?
 
Say you have two rooms, A and B. The player can only be in room A. When the player walks up to the wall between the two rooms the walls renderer stops working and can see into room B that they cant enter. Now I fixed that with setting the collision radius to -1 so now when the player walks up to the wall it doesnt vanish. BUT now the player can walk up to that wall and right click and zoom and see into room B, which they shouldnt be able to see or enter. The colliders work, the player cant walk into the room.

My third post is a completely different issue. Something Ive been having happen on this level of my game and I have to rebuild the character from ground up again, over and over again til it works. Doesnt do that on my other four levels. Ive seen it happen when I adjust the character collider too small but changing it on level 1 doesnt fix the problem.
 

Justin

Administrator
Staff member
So it sounds like the camera is colliding with the wall causing it to see through the object? This relates to the collision radius - it should be a positive value and I'm not sure what happens when there's a negative value.

My third post is a completely different issue. Something Ive been having happen on this level of my game and I have to rebuild the character from ground up again, over and over again til it works. Doesnt do that on my other four levels. Ive seen it happen when I adjust the character collider too small but changing it on level 1 doesnt fix the problem.
This sounds like it's a layer issue - ensure the collider that it is colliding with is not within the solid objects layer on the character layer manager.
 
By default the collision radius was a positive number and the wall cannot be seen. Now in my level two there is a narrow set of stairs with void outside the camera goes outside the room and shows the void. How do I get the camera to only show what is in the room the player is in?
I found an item w a collider attached to a gameobject that was being moved with the player to fix the collision.
 
Here is a photo where Im in the stairwell and the camera goes outside into the nothingness and views back into my world. I need the camera to not do this.
 

Attachments

  • CameraOutsideWall.jpg
    CameraOutsideWall.jpg
    145.1 KB · Views: 4

Justin

Administrator
Staff member
I recommend that you place a breakpoint within the third person view type to determine why it's not colliding with the object. You'd place this within ThirdPerson.Move, around line 448 with the Physics.SphereCast.
 
Ok I was messing around some more with this and decided to turn on the object fader script in hopes that I could set some settings to stop the walls from disappearing by using the fader and setting the settings way down. When I turn on the fader and I turn into the wall, instead of the camera stopping it goes through the wall and I get this error code.

NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader.FadeObstructingObjects (System.Boolean immediateFade) (at Assets/Opsive/UltimateCharacterController/Scripts/ThirdPersonController/Camera/ObjectFader.cs:437)
Opsive.UltimateCharacterController.ThirdPersonController.Camera.ObjectFader.Update () (at Assets/Opsive/UltimateCharacterController/Scripts/ThirdPersonController/Camera/ObjectFader.cs:255)

Does that help in any way to figure out why this is happening? Thanks.
 
Top