@quenty/hintscoringutils 14.20.3 → 14.20.4-canary.11a5dcf.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [14.20.4-canary.11a5dcf.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/hintscoringutils@14.20.3...@quenty/hintscoringutils@14.20.4-canary.11a5dcf.0) (2025-05-10)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add even more types ([b31717d](https://github.com/Quenty/NevermoreEngine/commit/b31717d8c9f7620c457f5018a2affa760a65334a))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [14.20.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/hintscoringutils@14.20.2...@quenty/hintscoringutils@14.20.3) (2025-04-10)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/hintscoringutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/hintscoringutils",
3
- "version": "14.20.3",
3
+ "version": "14.20.4-canary.11a5dcf.0",
4
4
  "description": "Utility functions that let you score a proximity prompt (i.e. a Hint) based upon its relation to a character in 3D space.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,18 +26,18 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/adorneeutils": "^3.3.3",
30
- "@quenty/boundingboxutils": "^4.3.2",
31
- "@quenty/camera": "^14.20.3",
32
- "@quenty/draw": "^7.8.4",
33
- "@quenty/loader": "^10.8.3",
34
- "@quenty/maid": "^3.4.3",
35
- "@quenty/math": "^2.7.3",
36
- "@quenty/region3utils": "^10.9.3",
37
- "@quenty/vector3utils": "^10.8.4"
29
+ "@quenty/adorneeutils": "3.3.3",
30
+ "@quenty/boundingboxutils": "4.3.3-canary.11a5dcf.0",
31
+ "@quenty/camera": "14.20.4-canary.11a5dcf.0",
32
+ "@quenty/draw": "7.8.5-canary.11a5dcf.0",
33
+ "@quenty/loader": "10.8.4-canary.11a5dcf.0",
34
+ "@quenty/maid": "3.4.4-canary.11a5dcf.0",
35
+ "@quenty/math": "2.7.3",
36
+ "@quenty/region3utils": "10.9.4-canary.11a5dcf.0",
37
+ "@quenty/vector3utils": "10.8.5-canary.11a5dcf.0"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "b06c070ae91d5dab7bd8de6e290ad2caabb15d8f"
42
+ "gitHead": "11a5dcf7d4c7a0bfbf3337e97d30e8346ea09d3f"
43
43
  }
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  Utility functions that let you score a proximity prompt (i.e. a Hint)
3
4
  based upon its relation to a character in 3D space.
@@ -7,8 +8,8 @@
7
8
 
8
9
  local require = require(script.Parent.loader).load(script)
9
10
 
10
- local Workspace = game:GetService("Workspace")
11
11
  local RunService = game:GetService("RunService")
12
+ local Workspace = game:GetService("Workspace")
12
13
 
13
14
  local AdorneeUtils = require("AdorneeUtils")
14
15
  local BoundingBoxUtils = require("BoundingBoxUtils")
@@ -16,6 +17,7 @@ local CameraUtils = require("CameraUtils")
16
17
  local Draw = require("Draw")
17
18
  local Maid = require("Maid")
18
19
  local Math = require("Math")
20
+ local Raycaster = require("Raycaster")
19
21
  local Region3Utils = require("Region3Utils")
20
22
  local Vector3Utils = require("Vector3Utils")
21
23
 
@@ -105,12 +107,12 @@ end
105
107
  @return Vector3 -- Hit position
106
108
  ]=]
107
109
  function HintScoringUtils.raycastToAdornee(
108
- raycaster,
110
+ raycaster: Raycaster.Raycaster,
109
111
  humanoidCenter: Vector3,
110
112
  adornee: Instance,
111
113
  closestBoundingBoxPoint: Vector3,
112
114
  extraDistance: number
113
- )
115
+ ): Vector3?
114
116
  local offset = closestBoundingBoxPoint - humanoidCenter
115
117
  if offset.Magnitude == 0 then
116
118
  return nil
@@ -219,7 +221,7 @@ function HintScoringUtils.scoreAdornee(
219
221
 
220
222
  local extraDistance = 10
221
223
 
222
- local closestPoint =
224
+ local closestPoint: Vector3? =
223
225
  HintScoringUtils.raycastToAdornee(raycaster, humanoidCenter, adornee, boundingBoxPoint, extraDistance)
224
226
 
225
227
  -- Round objects be sad
@@ -236,6 +238,8 @@ function HintScoringUtils.scoreAdornee(
236
238
  end
237
239
  end
238
240
 
241
+ assert(closestPoint, "Closest point should be set")
242
+
239
243
  -- if (boundingBoxPoint - humanoidCenter).magnitude <= (closestPoint - humanoidCenter).magnitude then
240
244
  -- closestPoint = (closestPoint + boundingBoxPoint)/2 -- Weight this!
241
245
  -- end