@quenty/hintscoringutils 9.5.0 → 9.6.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
+ # [9.6.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/hintscoringutils@9.5.0...@quenty/hintscoringutils@9.6.0) (2022-12-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Scoring respects humanoid angle much more than distance, which allows for better control in close trigger scenarios. ([5c628de](https://github.com/Quenty/NevermoreEngine/commit/5c628de08208bacb28d330a280c040cee551dfe0))
12
+
13
+
14
+
15
+
16
+
6
17
  # [9.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/hintscoringutils@9.4.0...@quenty/hintscoringutils@9.5.0) (2022-11-19)
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": "9.5.0",
3
+ "version": "9.6.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",
@@ -28,16 +28,16 @@
28
28
  "dependencies": {
29
29
  "@quenty/adorneeutils": "^3.0.0",
30
30
  "@quenty/boundingboxutils": "^4.0.0",
31
- "@quenty/camera": "^9.5.0",
31
+ "@quenty/camera": "^9.6.0",
32
32
  "@quenty/draw": "^4.2.0",
33
33
  "@quenty/loader": "^6.0.1",
34
34
  "@quenty/maid": "^2.4.0",
35
35
  "@quenty/math": "^2.2.0",
36
36
  "@quenty/region3utils": "^6.0.1",
37
- "@quenty/vector3utils": "^6.0.1"
37
+ "@quenty/vector3utils": "^6.1.0"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
41
41
  },
42
- "gitHead": "2114f42ae399a4417a3ebd4d35bf481690ca7923"
42
+ "gitHead": "d9b0d10faa443cc42a6c2ac966f2f56d124bbde5"
43
43
  }
@@ -235,14 +235,15 @@ function HintScoringUtils.scoreAdornee(
235
235
  end
236
236
 
237
237
  local humanoidOffset = closestPoint - humanoidCenter
238
+ local flatHumanoidOffset = humanoidOffset * Vector3.new(1, 0, 1)
238
239
  local angleOffset = center - humanoidCenter
239
240
  local flatOffset = angleOffset * Vector3.new(1, 0, 1)
240
- local angle = Vector3Utils.getAngleRad(flatOffset.Unit, humanoidLookVector)
241
+ local angle = Vector3Utils.angleBetweenVectors(flatOffset.Unit, humanoidLookVector * Vector3.new(1, 0, 1))
241
242
  if not angle then
242
243
  return false
243
244
  end
244
245
 
245
- local distScore = HintScoringUtils.scoreDist(humanoidOffset.magnitude, maxViewRadius, maxTriggerRadius)
246
+ local distScore = HintScoringUtils.scoreDist(flatHumanoidOffset.magnitude, maxViewRadius, maxTriggerRadius)
246
247
  if not distScore then
247
248
  return false
248
249
  end
@@ -252,7 +253,7 @@ function HintScoringUtils.scoreAdornee(
252
253
  return false
253
254
  end
254
255
 
255
- return (2*distScore + angleScore)/3
256
+ return (distScore + angleScore)/2
256
257
  end
257
258
 
258
259
  --[=[