I’m going through the FPS tutorials (excellent btw), and changed the perspective to 3rd person. It gets ugly as I go through doorways. When making 3rd person games, does one make bigger doorways and hallways, or change the controller script to move the camera through tight spots. If its the latter, does said script already exist somewhere? Thanks
Ah, but there is indeed a dedicated third-person tutorial for Unity around somewhere…
Thanks. After I get through the FPS tutorials, I’ll try to hunt it down
A technique I’ve just started using (and found pretty effective) is to add “whiskers” to the camera to move it when it is about to lose the line-of-sight to the target. Do a couple of linecasts (see Physics.Linecast method) from points slightly either side of your camera to the target object’s position. If the left “whisker” is interrupted, then move right a bit. If the right one is interrupted, move left. If you are using physics, you can use the distance of the detected hit to vary the force with which you move the camera. Generally, the greater the hit distance, the more you need to move the camera to change the angle to the target, so the larger/longer the force must be.
I’ve been told that you can also do this kind of thing with a long collider following the line-of-sight, but I suspect it might collide a bit too often and too heavily with the scenery. Might be worth a try, though.
thanks for the idea. I’ll definitely try it if I cant find any premade script.
Are you referring to this?
If so then that’s not a tutorial so much as a very simple example project that has no doors to speak of. I think the general idea is not to enlarge your doors so much as manipulate the camera, whether that’s using andeeee’s suggestions (which seem a smart way to go based on my first read) or some other technique.
Ok thanks. Interesting example btw. The last engine I was using (Beyond Virtual) had different views included, I’ll just try to convert it from there into unity.
Don’t get me wrong, we’re interested in offering a better 3rd person tutorial/example so that’s on the to-do list, it’s just that as of today we only have the example project I referred to above. Sorry but I don’t have a timeline to offer on any 3rd-person tutorial/example updates, I’m just indicating that it’s on our list of needed items for now.
Good to hear . I look forward to it . I was just about to add it to the wish list.