Exciting Physics Engine Usability Improvements!

Hello creators,

Our physics team has been working tirelessly to enhance the usability of our physics engine and its features. Today, we are excited to give you a sneak peek at the first batch of improvements that are centered around Mover Constraints.

Let’s dive in!

1. Limit AlignPosition and LinearVelocity Max Forces per Axes

You can now define the maximum amount of force applied in each axis using a Vector3 for the AlignPosition and LinearVelocity mover constraints. This empowers you to design more custom behavior and should enable you to fully replace all BodyMovers with mover constraints. You can read more about this new capability here.

2. New LookAt Mode for AlignOrientation

We are adding a new AlignOrientation mode called LookAt which forces the primary axis of your first attachment (Attachment0) to always point towards the second attachment (Attachment1). This makes it a lot easier to add things such as motion tracking security cameras or guided missiles. You can find more information about AlignOrientation and all its modes here!

3. Enhanced UI/UX for AlignOrientation

AlignOrientation is getting a user interface refresh. We’re simplifying the process of selecting between modes by removing the boolean-based approach for the two single axis modes (parallel and perpendicular). Instead, we are introducing all three previous modes (AllAxes, PrimaryAxisParallel, and PrimaryAxisPerpendicular) along with the new LookAt mode directly under the AlignType enum. The default mode will remain “AllAxes” to maintain consistency.

Looking ahead, we have an exciting roadmap of features planned:

:sparkles: Force visualization for all forces and torques to aid in debugging physics issues.

:sparkles: Access to additional mass properties like Moment of Inertia.

:sparkles: Visualizing mass properties such as the Center of Mass and Moment of Inertia.

:sparkles: And many more enhancements to make our physics engine even easier to use.

Stay tuned!

We value your feedback and suggestions! We want to ensure that we are addressing your needs and continuously improving our physics engine. So please let us know what you think about the upcoming improvements and share any ideas or requests you have for making the engine even better.

Happy Building,

M0bsterLobster

241 Likes

This topic was automatically opened after 10 minutes.

How can I make AlignPosition maintain a constant velocity and not apply force on the Y axis? MaxAxesForce I thought it would be a unit vector that would multiply itself with the MaxVelocity given. However, it has these big numbers 10000, 10000, 10000 which are hard to manipulate unless I get the right formula to get a constant speed between the origin and the goal without the object starting slow or slowing down at the end.

10 Likes

This’ll be a lot of fun to work with! I can already see many great use cases for camera-work using AlignOrientation constraints. Sounds like this opens a good amount of extra room for cutscene ideas as well.

Can’t wait for those additional mass properties to be introduced too :slightly_smiling_face:

Thanks for these!

15 Likes

Do you guys plan to add something like Unity FixedUpdate? I think it would help a lot :nerd_face:

17 Likes

Will we get access to run code every physics step?
What I mean by this is to either get access to the 240 hz “loop” that is used by the built-in physics or get access to a reliable version of the RunService.Stepped event that doesn’t directly change based on framerate.

It’s very difficult to create a character floating force (or something of the sort) with the current stepped event because the stepped event is directly tied to framerate
This means that if the framerate is, for example, 5, the character floating force only updates 5 times per second. This causes the force to get super bouncy and out of control.

The given example can be seen in the game Road To Gramby’s, where if your framerate gets too low, you are prone to bouncing out of control. This is because (to my knowledge) Road To Gramby’s uses a custom floating force for characters.

If anybody wants to test this, mess around in a free private server. I’d say spawning a ton of objects will do it.

Adding this would be a nice usability improvement I’d say.

19 Likes

LinearVelocity is finally useable good job :+1:

7 Likes

Great update! Center of mass visualization and moment of inertia property are really exciting features! I really could have used the moment of inertia a while ago too :sweat_smile:

Looking forward to even more of these features someday too.

5 Likes

This is a massive step! Appreciate this!

6 Likes

I got really excited, but all these features already existed. So… that’s a let down. I generally don’t like seeing announcements which are just recaps.

12 Likes

Interesting! I have no idea what any of this means but interesting!

5 Likes

This isn’t going to bring us any closer to planetary gravity.

4 Likes

The LookAt mode is a new feature that is really cool. Try it out! :slight_smile:

10 Likes

Looking forward to the Moment of Inertia property - a game I work on allows players to build massive spacecraft, and we regularly encounter an issue we refer to as “mass locking”, which we believe is where moment of inertia exceeds some internal value and prevents the ship from ever turning. I can provide a reproduction place, it’d be nice if this could be looked into - it’s the only thing stopping us from allowing players to build bigger lol

This would be beautiful.

4 Likes

Finally! Been looking for this one, glad it’s finally out!

5 Likes

Cool changes.

For the force visuals: please make them very clear/large.
The current force visuals (vectorforce) are very small, and difficult to see.

I like the axis limits, this brings the new forces on par with the old bodymovers.

I’d like to see better physics debugging tools (maybe even performance analytics!). Or better documentation on current physics debuggers, and how to use them (article).

8 Likes

Whoa, it has been a long time since I saw a physics announcement.

These enhancements, particularly the new

is amazing.

5 Likes

Related:

Also why did just take almost 11 months to add per axis forces to alignposition since it was first being “looked into”? Just curious.

8 Likes

Love the changes for usability that enable nice shortcuts! Makes the objects feel extremely robust and intuitive.

Has the team ever considered doing some form of demo-tutorial in video/docpage/rbxl form? For example, Speedtree does this on their Youtube channel (a series where they make some common foliage types in the tool to showcase the functionality).

I feel like it’d be super helpful especially for new devs to see curated guides on some common applications that these objects might be used for, since even user-generated content on this, especially on new objects, is a bit scarce, and I’ve always found it pretty challenging to give any developers learning the engine for the first time a “starting point”.

4 Likes

welp, this just makes making war games 10x easier

6 Likes