Help! how do I Set the camera using thumbstick data?
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement