How to achieve space gravity?

So i have 0 clue where this goes but its for a game so i am putting it here.

But how can i achieve space gravity in my game? I want this as i am making a game where you can mess around in space gravity.

Thanks in advance!

2 Likes

Have you tried to mess around with workspace.Gravity?

1 Like

Yes but it still does not work the way i would like, i have the feeling i am going to need to do scripting.

1 Like

Maybe add BodyVelocity to characters HumanoidRootPart? Do some Experiment. Maybe you’ll get the gravity you like by experimenting stuff!

2 Likes

Do you want the game to be always with Zero-G or do you want certain areas to be Zero-G?
If it’s the former, you can go to game settings and manually set the game gravity to the value you want.
If it’s the latter, maybe try to use Region3 and workspace.Gravity, though I don’t know how to use Region3 but have heard about it’s function.

There is a tutorial in Lua Learning that achieves a zero gravity effect for a part. I am unable to join the game so I can’t read the tutorial. But I remember one about using a BodyForce to let a part float around.

Gravity is just a force that is pulling all objects towards it. If most of your world is set in, for example, space you can simply set the gravity property in Workspace to 0. Else you need to create an equal and opposite force of gravity upon an object.

In workspace’s properties, there is a gravity value, change it to what ever number you like.

Mess around with BodyForce, BodyVelocity, Workspace.Gravity, or the Velocity property of the HumanoidRootPart. You may be able to achieve something. Hope this helps!

1 Like

The closest you can get normally is by setting workspace.Gravity = 0. I’m also working on a realistic space gravity engine that will be done soon, but I’m not ready to release it quite yet.

1 Like