Programming Project – FPS

This I’ve been working with creating the playerobject, the playermovement, boundingboxes for collision and the collision. When I tried to add plaermovement the first time I fucked it up completely, I didnt account for the direction the player is facing in anyway so it obviously didn’t work. I blame being tired for it.
Then I got the Idea to just use the movement that the camera already has and then make set the playerobject and boundingbox to the position to the camera after it’s done updating. This worked much better but I still have to find a way to make the movement 2d so that the player wont slow down because they are trying to move forward while looking out. One way I might fix this is to give the player all of the math to be able to calculate a view and then use this to calculate both a 2d forward direction (by making the Y coordinate always 0) and then sent theese variables in to the camera, and then the camera will use this information to crate a view that correlates with the direction and position as the player has.

For collision I created a simple box that has a position, and a volume. To check collision between to boxes we have to check if any of the corners on one box is inside the other box and vice versa. Since it have to check 16 verticies per check I added a range variable to each box, this will make sure that it will only check collision with objects in a certain range at a time instead of making these checks all the time when it isn’t needed.

Thats all for today, seeya!

Filed under: Uncategorized