Tuesday, November 21, 2017

Lots of progress

It's been a little over a week since I last posted. I've made a ton of progress but not alot that can really be shown. I'll do what I can with some quick screenshots.

First of all I decided to just ignore the particles issue for now. I'm nowhere near ready to start really working on fx and what i have works for what is needed.

I fixed a bug that had been annoying me since I first wrote the flight physics. When the aircraft was near 180 and the velocity dipped more or less the flight physics would go crazy. This was most obvious when I tried to implement barrel rolls. When upside down the angle of attack would get stuck at + or - 180 and you would either turn into a rocket ship or get slammed into the ground. well I fixed it! before I was finding the difference between your 3d forward vector, projected to 2d space, and the 2d physics engine velocity vector. This worked for small values but not larger ones. I now project the 2d velocity vector into 3d, and convert it to a "local" vector for the plane. I then project the local 3d vector back to 2d and find the angle. Theres actually less math involved in this case since atan2, which is expensive, is only called once instead of twice. All other math involved is fast multiplication, and I get the results I need for ALL angles!



I also fixed the "Snap" that was shown here.

As you can see in the gif I now have a better camera. It centers on where the player is looking while making sure the players vehicle stays on-screen, that way you have a good view of whats in front no matter your angle.

The next big step is terrain editing. I am working on an editor to make generating terrains fast and easy for myself. I'll do a more in depth post on it when it's in a more finished state. Once I'm happy with terrain editing I'll of course need a more general level editor where I can define terrain, player spawn, enemies, objectives, scenery, etc.



This project is definitely the longest one so far, but also the most complex yet!

No comments:

Post a Comment