Hey Creators,
I am @M0bsterlobster, a product manager on the physics team, and our team works on the physics engine and all its respective tooling. I’m here to discuss Units on Roblox!
We published this doc earlier today, but I want to take this opportunity to dive into the details of what this means for you and your experiences!
The Physics Engine
One of the key features of Roblox is its physics engine, which allows developers to create realistic and dynamic gameplay experiences. The physics engine is responsible for simulating the behavior of objects in the game world, such as their movement, collision, and interaction with other objects. Understanding the physics units used in Roblox can be helpful for game developers who want to create physics-based engaging and immersive games. In this blog post, we will explore the physics units used in Roblox and how they convert to metric units.
Converting Roblox Units to Metric
What is the physical length of a stud in Roblox? What is the unit of mass? Relating Roblox length and mass to real-world units can sometimes be confusing. In general, you can use the values in Table 1 to relate Roblox’s primary units for time (seconds), length (studs), and mass (the Roblox Mass Unit or RMU) to their metric counterparts. For example, when you use the Game Settings/World dialog box (Figure 1), the conversions from Roblox gravity to metric gravity (and jump height) show that there are 28 centimeters per stud.
We can use the primary units in Table 1 to generate conversions for derived units such as the density of water and air pressure at standard conditions. Table 2 provides these examples alongside a few other useful physical properties.
Gravity conversions are presented in Table 3 and should correspond to what you see in the Game Settings/World user interface.
Note: Roblox places limits on certain physical properties. You can reference these limits below in Table 4.
When Would I Use this Information?
Understanding units come in handy whenever you work with physics in Studio. Some examples include:
-
Customizing your experience’s gravity, jump height/power, and walk speed in the Game Settings/World dialog box (see Figure 1)
-
Playing around with density, friction, friction weight, elasticity, and elasticity weight when creating custom materials
-
Tuning stiffness and damping when using spring constraints
-
Setting the linear and angular velocities of parts using mover constraints
-
Applying forces and torques via cylindrical constraints
-
And much, much more!
Do Units Matter?
Internally, the Roblox physics engine does not use unit conversions. Creators are free to define their own unit interpretations for studs (length) and RMUs (mass), but these Creator-specified units should be used in a consistent manner throughout an experience. For example, if you decide one stud equals one foot, the unit density of water then implies an RMU is equal to 62.4 lbs (28.3 kg):
- 1 (g/cm3) * (30.483 cm3/ft3) = 28,317 (g/ft3) * (0.00220462 lbs/g) = 62.4 (lbs/ft3) = 1 (RMU/stud3)
This means that using a value of 22 kg/RMU for mass conversions and 1 ft/stud for length conversions could lead to unreliable results that may be harder to debug.
Overall, we recommend using standard Roblox units because it makes your experience work out of the box in all scenarios, such as compatibility with Virtual Reality controls.
We hope you found this article both interesting and useful. Please let us know if you come across any issues by commenting on this post.
We hope this inspires you to give physics a try in Roblox Studio - stay tuned for more physics articles like this one coming soon!