The default 3rd person (avatar camera) will move closer to your avatar when a solid object obstructs it's view. If this is not happening for you, then you are already using an avatar camera region as I describe below, and have encountered one of the problems with the pyprp defaults.
If you're not using an avatar camera region, they are the kind of region that actually sets up your default camera view. I recently set up one of these regions, in fact, in my tunnel age, to keep the camera from bumping up against the ceiling all the time.
To do this, create a camera activator region and tie it to a camera. The camera is where all the settings are, but in this case it doesn't matter where you put the actual camera object in blender. For the camera, give it the properties:
- Code: Select all
string cambrain avatar
float AvCam_X 0
float AvCam_Y 6
float AvCam_Z 6
The camera will always look at your avatar's head (unless you change the POA) and it will be fixed 0 units left, 6 units behind, and 6 units above your avatar's feet. (putting it about six feet behind, and level with, your avatar's head) (The default camera is about 12ft above and behind your avatar's feet)
Currently there is a slight problem with using this type of camera region. The camera will not smoothly animate but will be firmly planted behind your avatar, and it will ignore collision with walls. I had to fix this by modifying my copy of pyprp to export the CameraBrain with different flags, (0x00000420) but I've talked to Trylon, and this should be the default in the upcoming plugin release. (as well as allowing you to actually change these flags from the blender interface)
If you don't want to wait until the new version is released, you can use the bit of the stable version which I modified.
Also, looking over your post,
the camera will go outside the wall, like if I go to use my relto book.
What on earth do you mean by that?
Will putting in a Camera region keep that from happening?
No. A camera region does not keep the camera from leaving the region itself, it is a detector region that sets the camera type when your avatar enters it. It is possible, however, to add geometry that is not visible, but will affect the camera if it comes between it and your avatar. It is worth noting, however, that this behavior is not perfect, and the camera will occasionally clip the edges of a wall/collider, allowing you to see the other side for a second if the collider is drawable.