Custom Gravity/Acceleration Groupings for parts

Introduction

As a Roblox developer, I currently find it difficult to apply custom physics like gravity, or acceleration to specific parts.

Problem

Currently, the only real way to apply custom gravity to a part, without changing all other parts in your game, is through legacy BodyMovers, such as BodyVelocity. This method can often remove some of the features available to parts, such as Part.Velocity and often means running code to apply the gravity and physics yourself. rather then having it run in the background. This can often create complicated code, for what really should be a simple process.

An example of this would be a current project of mine. I’m trying to create a custom Ship with a controller, but a problem I’m faced with is the issue of applying forces to the ship, like the velocity. For my purposes I need to use custom gravity, and so I use body movers, like BodyVelocity. The issue is, I have to create my own drag and moment so that the ship does not just stop on a dime. It also means that the applied Velocity is constant, and dosn’t slow down over time in the way Part.Velocity does This makes it quiet difficult to apply forces to the ship if it were to for example, get rammed by another ship, and displaced.

If Roblox were to address this issue, I feel like it could help me and others in this situation by allowing for more control over the physics of our games.

Possible Solution

A possible solution I thought of, would be to use some sort of Gravity or Physics grouping method, much like CollisionGrouping. You could set the desired variables, such as gravity, acceleration in a given direction, drag, and moment and then just tell a part to work on these physical laws, rather then the ones set by the world.


I hope I’ve clarified and explained my thoughts clearly in this post. But if there’s any misunderstandings or questions, I’ll be happy to explain in more detail. Please excuse any bad format of my post as this is my first time posting on the DevForums and I’ve tried my best to stick to the post guidelines.

Thank you all for your time,
-Charlie

6 Likes

Yeah this would be a great feature to have.
Currently, creating custom controllers is really hard due to the fact that default gravity gets in the way.

We should have a property for BaseParts, like: “GravityScale” double or “UseGravity” boolean, both are in Unity and they make everything so much easier!

1 Like