Archived

This topic is now archived and is closed to further replies.

Fine Tuning Analog Controller Scheme

This topic is 5045 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My action mapper sends me my analog or joystick feedback on a scale -1 to 1 on both the RightLeft axis and UpDown axis. I managed to create a reasonably smooth camera-relative directional control out of it but I have one small problem left -- character velocity. If I use the magnitude of the original vector the character runs faster for diagonal directions on the analog or joystick. That''s because going straight left(or right) gives me a magnitude of 1.0f(at full speed) and same for straight Up or Down on the analog - BUT at diagonals I have say 1.0f right AND 1.0f up ,which gives me root2 for magnitude which is bigger than 1.0f -- but it should only be 1.0f at any maximum direction. How do I get a magnitude for finding velocity out of the analog or joystick control??? Any ideas????

Share this post


Link to post
Share on other sites
The directional vector is already normalized.. Er no. That still doesn't get me the velocity. Cuz I need the magnitude so I can extract the velocity. If I normalize the vector the magnitude is always 1.0f so that doesn't work. Am I missing something here?

(oops - didn't mean to post this here)

[edited by - pixelstar on February 21, 2004 12:42:37 AM]

Share this post


Link to post
Share on other sites