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"

Change camera angle when hitting the collider.

Hello, I need to make my camera change angle when it's in a certain place, like Mario 3d world. Example, when I go to another obstacle, the camera distance a little and angle changes, I think I should use a collider to know when to change the camera angle. But I do not know how to do it in the Blueprint. (Do not change camera, just angle, distance) thanks for the answers!

Product Version: UE 4.16
more ▼

asked Jun 07 '17 at 03:42 AM in Blueprint Scripting

avatar image

1 1 1

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

2 answers: sort voted first

Make an actor that has a single collision volume and a rotator and a scalar in it. Set these variables manually. Then, from the event OnBeginActorOverlap you cast to the character class and if successful you call a function in that character class called SetNewCameraAnglePos (or whatever you want) and send in the rotator and scalar you stored.

Inside the SetNewCameraAnglePos function you set the angle of the camera and the distance of the camera based on the rotator and scalar.

Alternatively you can just return a vector that acts as an offset vector that you add to the character to get the new camera location. It comes down to how you have made the character really.


more ▼

answered Jun 07 '17 at 04:39 AM

avatar image

2.7k 107 35 180

avatar image willianjohns Jun 08 '17 at 05:45 PM

: O I have no idea how to design this in Blueprint

avatar image NoobsDeSroobs Jun 08 '17 at 10:52 PM

Look up a tutorial on using a SpringArm for your camera. It seems you dont know anything about this, so start with copying the tutorial and learn from it. It is the safest bet to use a spring arm. Then, when you want to rotate the orientation of the camera you update the orientation of the SpringArm instead. If you want to move the camera closer or further away you just update the LENGTH of the Spring arm. GL with learning.

The rest of the answer applies after you are able to do the above two steps. Then, when entering the volume, get the two variables that give you the rotator and distance you want and just use them with what you learned from the two steps above!

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

Use a 'spring arm' component inside your character blueprint and attach the camera to it just like the one in the third person template. You don't need to do any coding for that. Remember that the obstacles must have a collider with the camera component.


more ▼

answered Jun 07 '17 at 06:59 AM

avatar image

1k 29 14 46

avatar image NoobsDeSroobs Jun 08 '17 at 02:10 AM

Just using the spring arm will not solve it. He has to control the spring arm. Further, this does not really answer his question.

(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