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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How to make a ''look behind feature'' FPS/TPS?

Hello, i have attached the follow camera to my mesh's head and checked the ''Use Controller Rotation Yaw'', but now when i try to change the rotation of the camera through a blueprint of the character's bluperint it always remains in the same position, the character moving with it. I would like to know if there are similar options to manually recreate the option ''Use Controller Rotation Yaw'' and deactivate it when the '''look back'' feature is activated. What i mean by look back or look behind is the abilty of the player to rotate his point of view without changing other movement inputs. Like the ability in Outlast or Dying Light, when the player is looking behind while running or being idle. I would appreciate any support for this case!

Outlast: alt text alt text

Dying Light: alt text

Product Version: UE 4.11
Tags:
more ▼

asked Aug 25 '16 at 05:17 PM in Blueprint Scripting

avatar image

Xanadron
18 18 21 26

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

3 answers: sort voted first

Resolved

more ▼

answered Jun 27 '17 at 08:02 AM

avatar image

Xanadron
18 18 21 26

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

you can add a second camera on another spring arm, and you can parent that camera/SpringArm to the original springArm. or if this is first person, you can just parent the second camera to the original camera, but facing in the opposite direction.

then, when the player presses a button, get your original camera component reference, and use SetActive, with NewActive unchecked. when they release the button, use SetActive with NewActive set to true, to return it to normal.

this works because when an actor is set as the viewtarget for a playercontroller, it finds the first active camera component. disabling a camera makes it use the next active camera component in the component hierarchy.

more ▼

answered Aug 25 '16 at 05:47 PM

avatar image

ScottSpadea
9.6k 320 205 449

avatar image Xanadron Aug 25 '16 at 06:37 PM

Hi, i tried this and it kinda worked... for a while. When i close the simulation and i start playing again the viewport changes automatically to the second camera. My follow camera (first person camera) is not attached to any spring arm because it would interfere with the camera's settings, but i most probably don't know how to set things up.

avatar image ScottSpadea Aug 25 '16 at 07:05 PM

in that case, every time you enable 1 camera, disable the other.

or maybe this is just a hacky solution, and you should really just use 1 camera teleporting around, and maybe separate the camera from the character.

you could put all the effects in your camera actor, with functions for setting the distance, offsets, FOV, Letterbox, post process modes, etc... and make it detect custom physics volumes that can override effects. you should probably always use 1 camera, just teleporting it around or interpolating it along splines or attaching it to bones or whatever you need, and set your view target to this camera actor, instead of your character.

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

you can try it like this have a follow camera, and have another inactive camera that snaps to camera location, rotates, and rotates back when you release the input key, and deactivates

alt text

alt text

alt text

in my case, timeline is just a float track that goes from 0 to 165.

if you want to be able to look turning from both sides, make track from 0 to -165, and absolute one of the inputs

you might want to snap the camera location to 0,0,z first and lock x and y rotations while timeline is active, if not may not get what you want

01.png (103.6 kB)
02.png (82.2 kB)
03.png (57.1 kB)
03.png (95.1 kB)
more ▼

answered Aug 28 '16 at 09:45 PM

avatar image

FlameOfIgnis
399 5 4 13

avatar image FlameOfIgnis Aug 28 '16 at 09:49 PM

this is what i meant by locking rotation during timeline: alt text alt text

04.png (77.3 kB)
05.png (73.2 kB)
avatar image FlameOfIgnis Aug 28 '16 at 11:16 PM

hmmm... where you get the transform of previous camera, you can implement this instead of directly connecting the transform pin. this will make sure that the camera you use to look behind stays parallel to the ground. (Not sure though) alt text

i am working on other issues as well, will report back asap

01.png (89.1 kB)
(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