I just got around looking at the physics of GMod, and I'm having some serious problems starting out.
I have two questions, and they're very fundamental but also pretty important. It might even seem stupid at first, but at this point I'm confused because I've seen several cases of the answer not being consistent, depending on the source.
Please only post if you're reasonably knowledgeable about the subject. I'm not after information like "My friend told me it's this so it must be true". Also, it might be tempting to answer just the one question and think it covers both, but I've split it into two for a good reason, so please answer them separately if you can.
- Does Garry's Mod use the same length units as Hammer?
- How long is one GMod unit in "real" length units? (e.g. feet, meters)
1. Yes
2. Yes, it's inches.
Everything in the Source engine uses metric units -- kilograms, newtons, etc. -- apart from the lengths, which are in inches. This is purely to be compatible with the old Half-Life engine which used inches.
There is actually an extension in E2 that calculates all of this for you (if that's what you are looking for).
It's on the wiki, and it also specifies "default" units.
Well, everyone seems to think it's inches, which is why I'm confused. Does anyone have any evidence to back this up? Because according to this, the default Hammer units are NOT inches.
1 unit = 0.75 inches
This is consistent with the conversion tools and also seems to be consistent with standard measurements for common objects such as doors. 108 inches high would be pretty huge for a doorway, but 0.75 * 108 = 81 inches is fairly standard for real world housing.
From what I can tell, the logic behind this was that they made the player the height correct in inches originally, but when the player size didn't work out for gameplay purposes, everything was scaled up by 1/3. Effectively, players are much shorter than 6', they're more like 4.5' as the Valve wiki points out.
Obviously the implication is that if Beer's right and GMod does use default Hammer units, then either the information I've pointed out is wrong, or all of the wire length conversions (not just the E2 conversions) made so far are incorrect.
This can't be true, because if force units were Newtons, then if I applied a force of 1 N to an object weighing 1 kg for 1 second, I would expect a speed of 1 m/s, or 39.4 in/sec, or 52.5 unit/s. But I get nothing like this - if I apply 1 Force to 1 kg for 1 tick, I get a speed of 1 unit/s. So unless ticks are measured in some odd multiple of seconds, or the physics code doesn't work quite the way I expect, I don't quite get how it could be Newtons.
Last edited by Jimlad; 03-01-2009 at 08:04 AM.
Jim the length of a tick depends on the servers tickrate, which apparently is normally one of the following.
33 ticks/s
66 ticks/s
100 ticks/s
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Super Easy Wire Download
[edit - deleted because i'm dumb]
Last edited by Wenli; 03-01-2009 at 09:21 AM.
Bookmarks