controllerface / bvge

Personal game dev experiments
0 stars 0 forks source link

More Anti-grav Refinement #54

Open controllerface opened 3 months ago

controllerface commented 3 months ago

With a little time now after the last refinement effort, I still like the improved visuals, but I still want to see if I can fine tune this just a bit more. If possible, I want to make it so anti-gravity is only applied to an object if it collides with a static object OR another object that has collided with a static object, and do this recursively. So for example, if objects collide in mid-air, there is never anti-gravity applied. However, if an object falls onto the floor, it would get anti-grav. Then, if an object falls on top of that object, it also receives anti-grav, and this should occur recursively, such that as high as a stack of objects may go, as long as the object at the bottom of the stack is static (or touching static) everything on top gets anti-gravity.

I am not 100% sure how easy this is going to be, and it may not be practical, but i would like to try it. If I can make it work, it should make the visuals look pretty much ideal and remove any "floaty-ness" from the simulation.

controllerface commented 3 months ago

One thing I will do first, just to see if this "stacking" process is feasible, is try and augment the edge renderer to render edges in a different color if the object they belong to is touching static or touching an object that is touching static (recursively). I will probably need to add some new flag definitions to hulls and then propagate them down to edges during rendering to adjust the color.