So, I’ve been working on two very cool things for Starventure in the past few days.
First off, a sprinting system! Fairly obvious, you can sprint and you can drain stamina, just like the jetpack. Easy as that!
Speaking of stamina, I changed the DepletableResource script to only accept drainers, because trying to balance drainers and restorers became very confusing and inefficient when you only had two systems using the same resource, so I fixed that, yay!
I have also abstracted a good chunk of the gravity/planet system, so now we can have cool things such as homogeneous gravity fields! This is, as you can see, going to be used in space stations, because.. well it’d be weird if your gravity was spherical whilst you were standing on a plane, right? I’d definitely say so.
So, what’s up next? Well, I do wanna work more on the player controller to fix a bug that’s been plaguing me a good deal ever since I made the player force-based, when I limit the player gravity, I also limit the fall speed and jetpack force of the player! This wouldn’t be an issue if I was using regular gravity systems, but due to the complexity of gravity that is ever-changing and affects multiple axes at times, I’ll have to think of a solution. My main idea right now is to either get rid of acceleration forces and only move the player through impulses, which means there’s no need for a speed limiter, or something else. Or calculating the actual gravity velocity at runtime and approximating the raw movement forces. Or maybe I just calculate the forces right then and there and call rb.AddForce with ForceMode.VelocityChange at each FixedUpdate call once..
… that last one seems the most doable. I’ll keep y’all in the loop.
For now, I’ll work a bit on the camera rotation system, since travelling between gravity sources while your camera is rotating is… not fun.
See y’all!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.