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"

How to limit player controlled camera orbit around character?

Hi, UE4 noob here!

I currently have a camera which can orbit the player character. The player can control this orbit with x axis mouse input. However this is a side-scrolling game and I wish to limit the camera movement to a 90o angle, so that the camera cannot go all the way around the player. So far I have been attempting to use a clamp but with no luck, I also considered a timeline with a spline, but I have no idea how to use them.

alt text This allows me to orbit on the X axis 360 degrees.

Thanks in advance for any help :) Rob

Product Version: UE 4.8
more ▼

asked Dec 11 '15 at 02:46 PM in Blueprint Scripting

avatar image

Boring Rob
1 1 1 3

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

3 answers: sort voted first

Looks like we have figured it out.

Unreal 4.8

SOLUTION: Allowing the player to control the camera yaw to orbit the around the character at a specified angle:

alt text

Thanks very much to EvilOverseer88 for help in getting this sorted.

more ▼

answered Dec 11 '15 at 06:18 PM

avatar image

Boring Rob
1 1 1 3

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

In this case it seems like you wanted to add a little bit of rotation to the camera effect that it would orbit on a specific limit left to right on the side scrolling character. Whenever handling character rotations and the camera has a spring arm it is best to manipulate the spring arm since the camera is a child component of the arm.

Unreal Engine Version 4.10

The axis mapping input for adding the rotational value to the camera in the project settings ![alt text][1]

In the characters main blueprint alt text

more ▼

answered Dec 11 '15 at 05:28 PM

avatar image

11 3 4 5

avatar image ZZZZZION Dec 16 '18 at 04:12 AM

Hello, I have try what you done, but my yaw have not action, my character just do nothing, are there any things I missed?

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

Nice. Thanks. It works!!! But i have another doubt, how do i bring back the spring arm to its default value?

more ▼

answered Aug 10 '18 at 02:35 AM

avatar image

Toto Overal

avatar image KyleDail88 Aug 10 '18 at 01:04 PM

Either in your Construction Script or at the Event Begin Play you can grab what the current value is of the spring arm is and store that as a variable on its own so that it may be referenced anywhere you may need to call on it.

(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