Help With Realistic Zero-Gravity/Microgravity

Intro/Problems:
I want to make a realistic space station simulator (similar to the ISS) and have been working on various scripts for hydration, nutrition, etc. but the one thing I keep having trouble with is gravity. Using Roblox’s gravity and setting it to 0 just flings you when you jump. What I need help with making is making a script that allows you to float basically. You’d be able to spin/rotate and move around slowly.

I’ve tried using a fairly simple flying script I found but the main issue is there’s still an orientation. It also isn’t preferable as it doesn’t use keyboard commands since your body follows the camera. Might be able to modify my vision to allow some room of camera movement but that’s not as practical in my view. You can’t do a full 360 with the camera, anyway, as it’s still oriented normally.

I’ve seen the gravity controller @EgoMoose made (Wall stick/Gravity Controller)

which, I must say, is very well done. The issue with it, and why I can’t use it, there’s still a sense of gravity as you walk on walls/upsidedown. It’s not 0-G/micro-gravity. The camera manipulation, however, is pretty neat, and understanding how to make something similar in that regard would make sense.

Planned Keyboard commands (certain keys have specific functions, I could always tweak further but my thinking for what could do what):

  • W/A moves front/back
  • A/D for moving left/right
  • Q/E for rotating left/right
  • R/F for rotating forward/backward

Note:
I’m a pretty intro scripter, so examples of code would be helpful since the terminology and vernacular is difficult.

1 Like

You could always push the character up constantly with a bodyvelocity or something similar so it cancels out half/most of the force of it being pushed down, simulating gravity.

You’d have to get the mass of the character first though, just do a simple :GetMass() on the parts and add them together.

The issue with that is I’m trying to make microgravity (0-gravity in orbit, basically) so it’s not about just pushing down against the 0 gravity to keep it level, since then you’d be somewhat floating in an upward direction, there’d be no rotating/control of the body. It’s less so about using Roblox physics to achieve it as it is to make a script that makes it seem as though one is floating in orbit. The character would also be stuck in jump animation.

My space station design mimics the real international space station which utilizes the ability rotate around to put stuff on every plane (floor, walls, roof). Here’s a lovely picture of Canadian astronaut, Chris Hadfield, demonstrating this idea that you can operate in any direction:

1 Like

Actually, here’s a better idea of what I’m trying to do: here’s the game my friend, DrEgguin, has made/is making: https://www.roblox.com/games/168097015/Star-Wars-Space-Battle

Just as the ships are able to fly around in any orientation and the camera follows, I want to do this minus the space ship (so just the humanoid floating around).

1 Like