x

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"

Xbox One Controller Analog Stick Get (Angle/Rotation)?

Hello currently I have an Xbox One controller setup to use in my project. The problem im facing is that the input axis only returns the angles in 45 degree increments. What I want is the return value of where the analog stick is facing from 0 - 360 degrees either precisely or in steps of 10s 5s 1s etc. Currently this is the blueprint logic setup so far.

alt text

alt text

Product Version: UE 4.8
Tags:
more ▼

asked Jul 03 '15 at 06:55 PM in Blueprint Scripting

avatar image

twinnaz06
1 1 2 2

avatar image Shadowriver Jul 03 '15 at 06:58 PM

Can you say which function you call to get that angle so i can study it for you? Maybe screen blueprint?

avatar image twinnaz06 Jul 03 '15 at 07:00 PM

check the attachments its there just didn't show

avatar image Shadowriver Jul 03 '15 at 07:56 PM

Whats that graph? It computes the angle?

avatar image twinnaz06 Jul 03 '15 at 08:20 PM

Yes. Using input axis then converts it into a rotator so that whatever directIon the analog stick points it should return that angle

avatar image twinnaz06 Jul 04 '15 at 12:41 PM

Here's a simplified version. Im trying to get the look at direction whenever I point the controller joystick in a given directions. So far its working alt textbut in only increments of 45 degrees. Any help would be much appreciated.

bp2.jpg (141.8 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello twinnaz06 ,

Not sure if you already have a solution for this, but I will post what I came up with for you or anyone else that might find it useful.

I used an Atan2(Degrees) node with the axis of the joystick I am measuring as inputs. Below is the Function I made.

alt text

Here is the function in use. AttackForward and AttackRight are the axis that I mapped to my controller joystick. I am using it to change the direction that my character is facing, but you should be able to adapt it to your code.

alt text

Let me know if this works out for you!

Cheers,

-Adam

more ▼

answered Sep 01 '15 at 09:53 PM

avatar image

Rehket
56 2 3 4

avatar image twinnaz06 Oct 19 '15 at 02:21 PM

thanks I have found a solution im also going to try out yours once I get everything up and running again

avatar image Chef_Seth Oct 04 '16 at 11:54 PM

I know this is old but I was wondering if there's any way to do the opposite of this? Take degrees and convert them into 2 digits like that?

avatar image jtsmith Feb 09 '17 at 05:33 AM

Fantastic, exactly what I was looking for!

(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