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"

Lock/Restrict SpringArm Rotation

I'm currently setting up my Pawn, and I've come across an interesting problem with rotation.

As it currently stands, I've got a sphere at the origin, and my pawn camera should orbit that sphere (which it currently does) with W/S controlling pitch (up/down) and A/D controlling yaw (left/right).

My blueprint looks like this: BlueprintScreenshot01

The issue with this current setup is that I want to make sure the camera is always 'upright'. In other words, I only want the camera to move up/down/left/right and never at an odd angle around the sphere. The issue here is that currently you can rotate at any angle and get upside down, as well as the controls reversing on the opposite side of the sphere.

Hope I'm explaining this well enough. Here's a diagram: DesiredEffectDiagram

Just wondering whether there is an easy/efficient way to approach this. It's times like this when I wish my math didn't suck really bad.

Thanks for any help you can offer! :)

Product Version: Not Selected
more ▼

asked Jan 03 '15 at 06:28 PM in Blueprint Scripting

avatar image

79 25 27 31

avatar image Raikoh Jan 03 '15 at 06:48 PM

Hey, i was in the same situation 2 weeks ago, i tried a few things (im also not good at math) and i could not figure it out easily, so i gave up. Hope this tread get an answer tho, im curious about it :)

avatar image Tylru Jan 03 '15 at 07:00 PM

I'm starting to play around with rotating a sphere component for the yaw movement, with the arm only actually doing pitch itself. I'll post if I work it out before someone much smarter than me comes up with a better solution :)

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

1 answer: sort voted first

Resolved this. I have a habit of resolving my own issues, but I figure it'll help someone else even if I do :)

It's as easy as this:

Fix 01

This being the component layout for the Pawn:

Fix 02

Yaw (Left/Right) rotation is managed by the ArmRoot (sphere component), and Pitch (Up/Down) is managed by the Spring Arm itself. This might not be a necessary distinction, but I find it easier to understand this way anyway.

I haven't yet tackled the issue with the poles, however I'm leaning towards restricting the camera from going that far up/down anyway, so it won't be an issue for me after all.

more ▼

answered Jan 03 '15 at 07:37 PM

avatar image

79 25 27 31

(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