Old question, but: Units to Meters?

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Old question, but: Units to Meters?

Postby BackRaw » Sun Oct 02, 2016 5:40 pm

Hi,

what was the correct formula to convert ingame units to meters for CSS again?
Oh, and does the same formula apply to each engine (CSGO, TF2, etc.)?

Thank you. :)
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: Old question, but: Units to Meters?

Postby satoon101 » Sun Oct 02, 2016 6:07 pm

We haven't exposed it, but this is the same for each engine I have checked:
https://github.com/alliedmodders/hl2sdk ... face.h#L40

1 unit = 1 inch
Image
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Re: Old question, but: Units to Meters?

Postby iPlayer » Sun Oct 02, 2016 7:32 pm

A unit's relationship to real-world measurements is not set in stone or precise; it is defined only by the scale of a game's content.


But for HL2 here's the table: https://developer.valvesoftware.com/wik ... _reference
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Re: Old question, but: Units to Meters?

Postby BackRaw » Sun Oct 02, 2016 10:10 pm

Thank you very much, helps a lot.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 43 guests