GoldenEye: Source Forums

  • December 18, 2024, 04:13:57 am
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: [Solved] What Type of Measurement does GEUtil.DistanceBetween() Return?  (Read 13214 times)

0 Members and 1 Guest are viewing this topic.

Phivex

  • Agent
  • *
  • Posts: 21
  • Reputation Power: 3
  • Phivex has no influence.
  • Offline Offline

The function takes two entities. When I pass it two players to find out what the distance between the two are when one is killed, it returns a float. I could be what seems like 10 feet away from the victim when I kill them, and it may say 127.XXXX.  The comments don't specify the type of measurement, though 10 feet would equate to 120 inches, so maybe it's a measurement for virtual inches?
« Last Edit: September 18, 2016, 06:33:01 pm by Phivex »
Logged

Adrian

  • Lead Artist
  • Secret Agent
  • *****
  • Posts: 81
  • Reputation Power: 115
  • Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!Adrian is awe-inspiring!
  • Offline Offline
    • Steam profile
Re: What Type of Measurement does GEUtil.DistanceBetween() Return?
« Reply #1 on: September 18, 2016, 06:08:24 pm »

In Source, 1 unit = 0.75 inches. You can read more about dimensions in the Source engine in this article.
Logged
Official releases: Depot, Archives Classic, Library Classic

Third-party releases: Deus Ex-inspired Chateau DuClare

Phivex

  • Agent
  • *
  • Posts: 21
  • Reputation Power: 3
  • Phivex has no influence.
  • Offline Offline
Re: What Type of Measurement does GEUtil.DistanceBetween() Return?
« Reply #2 on: September 18, 2016, 06:32:48 pm »

Awesome! Thanks for the info and reading material. I'm definitely new to working with the Source engine, so it'll help.
Logged

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: [Solved] What Type of Measurement does GEUtil.DistanceBetween() Return?
« Reply #3 on: September 18, 2016, 09:29:45 pm »

You really shouldn't think of it in terms of real-world dimensions. Its a unit, nothing more nothing less. Just get comfortable visualizing what 100, 500, and 1000 units looks like in game and go from there.

Good reference points: Players are 72 units tall and 12.5 units in diameter, Floor-to-ceiling heights are generally 128 units.

So if you want something to happen within 10 "player widths" away, simply put in 125.
Logged
Pages: [1]   Go Up