BGP – TwinShift – Alpha and Improved Camera
|
This week we have seen the most progress out of any week since we’ve started. Things finally works well enough for us to have a reason to merge our projects since since we no longer will be hindered by other things. I’ve mainly worked on the camera again this week and it feels great to say that it starts to look really good. One of the biggest flaws that my camera had last weeks was that I used Unitys LookAt method to track the player. There was two reasons that this was a bad idea; 1. The anti-gravity script doesn’t move the player in a way that is smooth enough so that when we look directly at a point that is directly related to the players position it wont be noticeable. What I could have done here is that I instead look at another point that is moving smoothly towards the point that is related to the player. This isn’t a good Idea however and this is because of reason 2. So instead I just lerp the camera rotation towards the player rotation at all times and this works really well in out game. An other problem was that the movement of the camera started to look choppy at high speeds so instead of setting the camera directly at the previous target position I made it so that the camera will move towards that position instead. One other thing that came of this is that when accelerating the camera will automatically move further away from the player so I wont have to change the FOV to get that “moving-so-fast-the-camera-cant-keep-up-effect” (although I might still do that to see hoe it looks). After theese changes the camera actually looks pretty great, here is a clip of it in action: http://gfycat.com/TalkativeTatteredIsabellinewheatear One problem I found with this camera was that while playing 1, 3 or 4 players the camera works very well, but when playing 2-player the split screen limits the vision on the side of the screen so that the player will often be placed at the edges on the screen when turning left or right. To fix this I made the target position that the camera moves towards to move left and right relative to the player when the player turns. When the player turns left the camera will also move left to keep the player in center while providing a better view of their surroundings and vice versa. Here is a shitty visual representation on how the camera works at the moment. Filed under: Uncategorized |
