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?
 
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.
 
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: 7
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.
 
Did you enable character fade at runtime? I suspect m_MaterialModeSet is null. In that situation you can change the CharacterFade property:

Code:
        public bool CharacterFade
        {
            get { return m_CharacterFade; }
            set {
                m_CharacterFade = value; if (value) {
                    if (m_RegisteredMaterial == null) {
                        m_RegisteredMaterial = new HashSet<Material>();
                        m_MaterialModeSet = new HashSet<Material>();
                    }
                } else {
                    DisableCharacterFade();
                }
            }
        }
 
I did experience something like the described camera passing through the wall in a relatively clean scene with a relatively default character build. Apologies for speculation Justin as I know you dislike it. Anecdotally, I would say it was solved by increasing the collision radius on the camera, which whilst positive was not great enough. The target collider was a mesh collider. I don't know if the risk of this collision is increased by using the almost instantaneous movement of the camera which we can now have in v3 which we couldn't have in v2 and I wonder if I would have got the same problem if I had increased the 'time taken to lerp'? I may have this scene still so could possibly take a look and I never looked at the sphere casting.
 
So I think the issue I saw was the camera entering an area of a mesh with a very acute angle and the fov +/- lowest possible near clipping plane creating an issue - it would be fixed with an extra collider to keep the camera out of tight areas.
 
Yeah it is worse on these stairs which use a mesh collider but it still happens with just simple box colliders on simple walls as well. Im getting ready to attempt to put in a break point where Justin recommended next. I just went through the layers and the walls, ceiling and roof are set to that and set properly on the character layer manager. I have tried many settings on the collision radius and collision anchor offset and for right now its at -1 with .5 .5 .5 on the latter. These settings kinda stop it from going through the wall but not great. And the player can still walk up to the wall, at least see the wall now, but then just right click and zoom and see into the next room. Its like none of my walls, ceilings or floor work with the v3 of opsive. Let me get this break point setup, I had several other things to fix before I could get to this point.
 
I just put in break points, it is detecting the walls by firing a sphere and it is moving to avoid the obstacle but it still allows the camera to move past the walls and doesnt actually adjust at that time.
 
If it's detecting the object can you tell why it doesn't actually adjust to the desired position?
 
Do you have a suggestion where else to put a break in? It does adjust it just adjusts outside the walls. What would be your recommended settings in the collision? Any other areas for settings I should check?
 
Top