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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How do I create a third person shooter camera system?

I see a lot of people posting about this same setup but we haven't been answered correctly yet, not even once. I've looked at both the first person shooter and third person blueprint starter packages. The problem I'm having and I'm sure other are having is how can we have a chase camera in the third person shooter that doesn't rotate around the player mesh but turns the player mesh instead and setup camera zooming. Sometime along the lines of a Gears of War third person shooter chase camera system. Is this possible in Blueprint or does it require c++ coding?

Product Version: Not Selected
Tags:
more ▼

asked Mar 27 '14 at 08:27 PM in Blueprint Scripting

avatar image

darkhemic
86 3 4 9

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Solution

To get a fixed camera with the mouse and gamepad input controlling the zoom of the camera (can change this to the mouse wheel or another button), replace the sections in the Third Person Blueprint with the following:

Fixed Third Person Camera with Mouse Zoom

How to Use

se the WASD keys to move, and then the Mouse up/down to zoom in and out - note that there's no limits on the Spring Arm component target length, I'll let you add these in :D

How it Works

Zoom

ccess the CameraBoom (a Spring Arm Component), whenever you've moved the mouse/gamepad up or down, get its current Target Arm Length, add it together with the LookUp amount (this could be positive or negative), and then set the current Target Arm Length to this. You could scale the difference between these two floats to zoom quicker.

Movement

e're assuming that you'll be facing the camera in only the X axis when moving around here. We access how much you've pressed the W/S keys (MoveForward, can be positive/negative) and add it to the X direction of a new vector, and add this to move the Player Pawn forward. We do the same with the A/D keys, and add it to the Y direction of a new vector, and add this to move the Player Pawn sidewards.

If you have any questions, feel free to post them below :)

Edit

nd I've just realised, I missed that you wanted to use the Mouse to control the player mesh rotation, silly me. I'll have to add this in soon :)

more ▼

answered Mar 27 '14 at 10:02 PM

avatar image

OrganicHumans
86 1 5 6

avatar image bhex Sep 13 '14 at 01:06 PM

Hello, the image depicting the solution is not accessible, nor it is available in google cache. Could you upload it again? Thanks. :)

(comments are locked)
10|2000 characters needed characters left

Thanks to Wes Bunn and his solution in this answer. This simple solution solves one of the problems, getting the mouse and joystick to move the character and camera at the same time.

If you simply what the character to face the direction in which the mouse is pointing, take a look at the 3rd Person Blueprint Template and under the Blueprints folder for My Character, go to the Defaults tab and search for Pawn. Check the User Controller Rotation Yaw option and that will allow the pawn to face the direction the mouse is pointing.

Note: The character in this example doesn't animate and rotate towards the camera, there would be a little more involved in this.

Hope this helps points you in the right direction (yes pun intended)!

-W

more ▼ answered 2 days ago Wes Bunn gravatar image Wes Bunn ♦♦ 1.4k ● 40 ● 4 ● 3

more ▼

answered Mar 28 '14 at 07:02 PM

avatar image

darkhemic
86 3 4 9

avatar image darkhemic Mar 29 '14 at 02:55 AM

Continuing to build off the Third Person Blueprint Template, I've created a CameraZoom for both a joystick trigger and tab key on a keyboard, with variables that can be set in one location to keep things consistent between the 2. alt textalt text

(comments are locked)
10|2000 characters needed characters left

Wuhuuu... I finally fixed this shit myself after spending an entire day looking around.. Omg... And then it was there inside the first person template. Go to MyCharacter blueprint defaults and then see screens for instructions.

alt text

Under character movement.

alt text

Now you should be all good. No need for changing anything in the eventgraph (in regards to movement)

Zoom is equally as easy. Tutorial here: https://www.youtube.com/watch?v=U88LWbVv9BY

Good luck.

/Kenneth

movement.png (15.4 kB)
movement1.png (34.8 kB)
more ▼

answered Jan 20 '15 at 09:10 PM

avatar image

KennethMundt
61 9 10 16

avatar image KennethMundt Jan 21 '15 at 08:22 AM

I see now that this is a pretty old thread, so you've probably figured it out by now :)

avatar image darkhemic Jan 21 '15 at 12:16 PM

Yeah, it has been a while and I have it all sorted out now.

(comments are locked)
10|2000 characters needed characters left
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