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 do I prevent the camera from jumping when the spring arm intersects a corner?

Hi all. I absolutely love using the spring arm and can get some nice smooth camera movement with the right lag values. But when the spring arm intersects a corner or any kind of abrupt geometry between the camera and the character, the camera jumps jarringly to the intersect position. Not cool.

I thought I was being clever when I detached the camera from the end of the spring arm, put a dummy SceneComponent in its place, then had the camera chase the SceneComponent ("Camera Position Target") using VInterpTo and RInterpTo:

alt text

When I played the level and intersected the spring arm on a corner, the camera glided nicely to its target position, but then I noticed it had an annoying twitch every time my character changed direction. When I turned on "Use Controller Rotation Yaw" in the Pawn defaults, the twitch went away, though now my character looks like he's spinning on a lazy susan every time I move my mouse.

Anyone else annoyed by this? Got any ideas on how to remedy it (short of programming a custom camera movement from scratch)? What I'd love is for the spring arm to have this smoothness built in. Maybe put in a feature request? Any insights would be much appreciated.

Product Version: Not Selected
capture.jpg (78.5 kB)
more ▼

asked Sep 20 '14 at 06:10 AM in Blueprint Scripting

avatar image

36 2 3 6

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

1 answer: sort voted first

All you have to do is to check if the length of the spring arm has decreased abruptly (if it has encountered a corner). You can achieve this by creating a float variable named sth like "ArmLengthPrev" and taking the difference between this and the current spring arm length. If this is greater than a certain threshold (possibly 0 or 0.1), your branch would return TRUE and FALSE otherwise. If TRUE then you apply the interpolation; if FALSE you make the camera immediately jump to the scene component position.

more ▼

answered Sep 20 '14 at 08:11 PM

avatar image

2k 62 24 111

avatar image alperenakyuz Sep 20 '14 at 08:12 PM

Don't forget to update the ArmLengthPrev variable after the process is finished.

(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