Floaty Rail Stability System (for mechs, ships, sharks, bombs, whatever!)
Now that I've finally published my Gundam level, I can speak freely about the floaty rail system I use. =P Believe me, it's a lot simpler than it seems, but there are enough intricacies to mess it up if you're not careful. Having used many different methods and worked on this system for a very long time, I am proud to say this is probably the most proven stability system by far of its kind.
Not only have I used this to stabilize the player controlled mecha in my levels, I've also used this to allow a level of control and stability for my enemies with their tracking systems. This trailer vid I made of my previous level - SD Gundam Zaku Assault should help show the level of speed and maneuverability that can be reached with my floaty rail system.
http://www.youtube.com/watch?v=tl116DMrHBU
Remember, this system is not meant for emulating any sort of physics. It's to help give creators the ability to somewhat cheat the physics engine and provide a great level of stabilization for whatever you want throughout a "majority" of a level, preferably something that is flying.
Since I'm at work, I hope this lame text diagram helps.
Code:
[Base] >>>>>(0 strength/stiff spring/max length)>>>>>> [ Pink Floaty ]
[Base] >>>>>(0 strength/stiff spring/max length)>>>>>> [ Pink Floaty ]
//
//
(two 0 strength/stiff springs)
//
//
[anchor point]
Points of Interest
- The base can either be comprised of dark matter or a material that his heavy enough to hold up all of the mechanics.
- The pink floaty on the x axis should generally be larger than what is connected to the anchor point to prevent sway on the springs. If it's too big, issues with speed of movement will become present (i.e. sluggish). If it's too small, sway and tilt will become evident and can possibly (and will more likely) break your mechanism after a certain distance.
- The anchor point can either be the object that needs stabilization or another control box type mechanism that aids in movement/stability/etc. which the object will be connected to. I've done both examples and it works. For example, the Ball with a cannon in my Gundam level is representative of the first instance whereas every other enemy aside from the ball w/o a cannon represents the latter.
- If your anchor point is not the object itself, keep the anchor point light by obviously using light materials such as the floaties or dissolve/polystyrenes if you absolutely have to.
- The rail system can be placed either above or below the anchor point. I'm pretty sure you can flip the axes so that the pink floaties move on the Y axis and the anchor point can travel on the X axis. It's rather flexible so it all depends on how you want to apply it.
Things you want to stay away from:
- 0 strength pistons should generally not be used as they add just enough resistance to create the "death shake."
- The level of stability had with my floaty rail is rather great, but it does not hold up well at the extremes. A loss of stability can be found at the maximum vertical distance from the pink floaty to the anchor point. Breaking will generally ensue if you continue to move on these extremes.
- If your object has a decent amount of weight, never use 1 spring. Always use them in pairs.
Haven't tried an underwater application, but I can only assume it would help fight buoyancy if needed.
Any questions, just let me know. =)