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"

Mouse/axis input not clamping fast enough

We're having an issue with the clamp node not clamping quickly enough when using a mouse. We have our input axis controlling the pitch of a camera, with a clamp to keep it in the desired pitch range.

This is our setup currently: alt text

When using a mouse it seems to make the full sweep of the mouse then correct afterwards. This means with a large/fast enough mouse movement you can well overstep the clamped value before the rotation is corrected. In our case this causes floor clipping. It also causes jitter as the clamp fights with the mouse movement at the edge of the range.

What we really need is for the controller's pitch rotation to stop dead at 0 and -90 degrees, allowing movement within the given range and no further.

Things we've tried:

  • Setting up a manual clamp with branches - same effect.

  • Forcing a check of the pitch before allowing input to affect anything. Unfortunately we have the same issue; the check doesn't affect a fast mouse sweep until a degree or two past the desired rotation.

  • We tried the above using Disable Input too.

We know this is possible as we've seen projects with cleanly controlled camera angles before. Thank you for any suggestions.

Product Version: UE 4.10
camera_setupv01.jpg (184.8 kB)
more ▼

asked Mar 02 '16 at 11:24 AM in Blueprint Scripting

avatar image

13 2 5 7

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

1 answer: sort voted first

Try this:

alt text

I believe the problem is due to you setting the rotation before running it through the Clamp (by using AddControllerPitchInput)

untitled.png (102.7 kB)
more ▼

answered Mar 02 '16 at 11:47 AM

avatar image

1k 38 13 61

avatar image AlexJG Mar 02 '16 at 11:58 AM

Thanks for the fast response, that worked perfectly, exactly what we wanted thank you

(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