x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Camera of third person game doesn't work well

In my third person game, when my character is close to the wall and I look around, sometimes I can see through the wall or the camera seems to be inside the character. I have turned on"Do collision test" by the way. This issue won't happen in any completed games, and I want to know how I can avoid it.

Thanks,

David

Product Version: UE 4.10
Tags:
more ▼

asked May 29 '16 at 05:48 PM in Blueprint Scripting

avatar image

wcl1993
111 32 23 37

avatar image jblaswu May 29 '16 at 06:04 PM

have you tried the SpringArmComponent?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Sometimes you See trough the Wall? I guess that means if your Camera is very near the wall almost aligned to it you can See trough it on the edge of your Screen? If so that is the near clipping plane of the Camera. You can reduce it under Project Settings -> Engine -> General Settings -> Near Clipping plane (set its as low as needed not lower)

Do Collision Test only works if the Collision of the Obstacle between Camera and Player has the Camera Channel set to Block. Thats why you could let your Camera fly Behind a Wall.

Camera gets inside the Character is because your Character Stands very close to a Obstacle now your Camera has only two Options left. Get inside the Wall or get inside the Character. But you have a little Control over that. On your Camera Boom where you Set the "Do Collision Test" there is another Options called Probe Size. You can imagine it as a Sphere around your Camera that is used for Collision testing. If you set it higher it will have a bigger offset of the Obstacle and push more towards your Character. If you set it lower it will be much closer to the Obstacle and we are back to Problem Nr1 the Near Clipping Plane where your Camera can get so close to a wall that you can See trough.

As you See its a trade off one or the other you cant avoid the Character and the Wall at the same time without adding some more Logic via Blueprint. Like for example if your Camara Boom Arm length is less than 100 start rotating it in a direction so it does not stay between the Wall and the Character. But thats something you have to decide what your Camera should do in this situation. UE4 provides you the Basic things you need.

Good luck with Balancing your Camera options =)

more ▼

answered May 30 '16 at 02:59 AM

avatar image

Nachtmahr
7k 143 28 172

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question