Sign in to follow this  
00Kevin

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

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this