@quenty/physicsutils 4.0.0 → 4.1.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 +11 -0
- package/LICENSE.md +1 -1
- package/package.json +2 -2
- package/src/Shared/PhysicsUtils.lua +2 -2
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
|
+
# [4.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/physicsutils@4.0.0...@quenty/physicsutils@4.1.0) (2023-05-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Initial refactor of guis to use ValueObject instead of ValueObject ([723aba0](https://github.com/Quenty/NevermoreEngine/commit/723aba0208cae7e06c9d8bf2d8f0092d042d70ea))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [4.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/physicsutils@3.0.0...@quenty/physicsutils@4.0.0) (2022-09-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/physicsutils
|
package/LICENSE.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/physicsutils",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "General physics library for use on Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "11058e90e51ea83d3dad6ae9abe59cc19c36b94b"
|
|
31
31
|
}
|
|
@@ -67,7 +67,7 @@ end
|
|
|
67
67
|
]=]
|
|
68
68
|
function PhysicsUtils.getCenterOfMass(parts)
|
|
69
69
|
local mass = 0
|
|
70
|
-
local weightedSum = Vector3.
|
|
70
|
+
local weightedSum = Vector3.zero
|
|
71
71
|
|
|
72
72
|
for _, part in pairs(parts) do
|
|
73
73
|
mass = mass + part:GetMass()
|
|
@@ -152,7 +152,7 @@ function PhysicsUtils.applyForce(part, force, forcePosition)
|
|
|
152
152
|
if momentOfInertia ~= 0 then
|
|
153
153
|
rotAcceleration = torque/momentOfInertia
|
|
154
154
|
else
|
|
155
|
-
rotAcceleration = Vector3.
|
|
155
|
+
rotAcceleration = Vector3.zero -- We cannot divide by 0
|
|
156
156
|
end
|
|
157
157
|
|
|
158
158
|
local acceleration = force/mass
|