Jump to content
  • Advertisement
Sign in to follow this  
00Kevin

Help! how do I Set the camera using thumbstick data?

This topic is 4435 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

Hi, Here is my problem. I have a simple function to set the camera postion(move the player) This function is normally called like this this. Camera.SetCamera(PlayerPosition.x, PlayerPosition.y, PlayerPosition.z, PlayerPosition.x + System.Math.Cos(PlayerAngleY), PlayerPosition.y + System.Math.Sin(PlayerAngleX), PlayerPosition.z + System.Math.Sin(PlayerAngleY)) The data from my game controller (xbox 360 controller for windows) looks like this. Left thumbstick Z is always 5000 X is an integer from 0 to 10000 Y is an integer from 0 to 10000 Right thumbstick X is an integer from 0 or 10000 Y is an integer from 0 or 10000 Thanks for your help.

Share this post


Link to post
Share on other sites
Advertisement
Well, it depends what you want the camera to do when the player moves their thumb! A common thing on a console would be to treat the left analogue stick (PS2 terminology)/thumbstick as a mouse, so high X rotates to the right etc.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!