An example of how to convert a real world density of 997 kg * m^-3 Return value * (STUDS_PER_METER ^ meters) * (ROBLOX_KG ^ kilograms) As a result, we get mass = volume * density (density of water in ROBLOX is 1 instead of ~1000 so divide by 1000), and thus the following code: local STUDS_PER_METER = 1 / 0.28Īdditionally, you could write a function for converting real numbers to roblox numbers and vice versa: local function convert(value, meters, kilograms) This constant can be calculated by representing the amount of studs in a meter as 1 meter. So to go from real kgs to ROBLOX kgs and vica versa, we need a constant to convert with. A mass of 1 kg would not apply in real life, since we know that 1 stud != 1 meter. This is because in the Realistic setting of the World option, a part that has a size of 1x1x1 with a density of 1 has a mass of 1. I defined the kilogram based on the scale of the stud. Something that I have not seen in the replies of this post is the following way to calculate the ROBLOX kilogram. It essentially provides you with a constant that I named ‘STUDS_PER_METER’ that is equal to 1 / 0.28 (this number is also discussed earlier in the replies). This option sets Workspace.Gravity to a value that gives you a realistic stud scale that is based on the height of a character. This post contains a lot of useful information about unit conversion, but I have a different solution for finding how much a kilogram in ROBLOX actually is.įirst of all, I just want to clarify that I set the ‘World’ option in ‘Game Settings’ to ‘Realistic’. I am currently working on a showcase game that involves drag, lift and buoyancy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |