This probably sounds quite a newbie question, but TBH I am a newbie with C# and doing this type of thing :-)
I've created a first person camera for my final year project at Uni, but it looks more like a flight simulator than a FPS camera. My idea was to lock the Y axis by setting the Direction to 0 when the player moves forward/backward, but this also affects the mouse movement when looking around.
The camera is the only thing that has given me so many problems, and I've only a couple of days to get it sorted.
Are there any suggestions?
What I'm using right now:
// Move forward/backward
if (Keyboard.GetState().IsKeyDown(Keys.W))
{
cameraDirection.Y = 0;
cameraPosition += cameraDirection * speed;
}
if (Keyboard.GetState().IsKeyDown(Keys.S))
{
cameraDirection.Y = 0;
cameraPosition -= cameraDirection * speed;
}

New Topic/Question
Reply




MultiQuote




|