bjorn
60c5472cba
Details;
2024-05-10 00:27:00 -07:00
Bjorn
4c6083e87c
Merge pull request #772 from jmiskovic/add/joint-limit-assertions
...
Assert the input range in joint limits setters
2024-05-10 00:26:12 -07:00
Josip Miskovic
09f106d435
Assert the input range in joint limits setters
...
The Jolt already asserts these values, which results in crash instead
of helpful error message.
For cone joint the value out of range will now throw error instead of
silent clamp.
2024-05-10 09:11:45 +02:00
bjorn
6187ea19d0
Work around weird GCC warning;
2024-05-09 21:11:36 -07:00
Bjorn
4fce7240bc
Merge pull request #771 from jmiskovic/fix/joint-typecheck
...
Fix remaining assertions of the Joint type
2024-05-09 12:56:28 -07:00
Bjorn
f0c1952f8d
Merge pull request #770 from jmiskovic/fix/jolt-flat-terrain
...
Fix creation of flat physics terrain
2024-05-09 12:04:55 -07:00
Josip Miskovic
4c0c8f358d
Fix remaining assertions of the Joint type
2024-05-09 16:22:27 +02:00
Josip Miskovic
c383fe3818
Fix creation of flat physics terrain
...
There is not enough samples in 2x2 vertices, because the physics_jolt
additionally divides scale with n - 1.
2024-05-09 14:17:36 +02:00
bjorn
ef4ddd3284
Build Jolt as a static library;
...
joltc's current CMakeLists forces itself to build as a shared library on
PC/Android. However, it builds Jolt using the current value of
BUILD_SHARED_LIBS.
We currently have BUILD_SHARED_LIBS set to ON when adding joltc, so we
end up with 2 shared libraries, which is cumbersome. We'd rather just
have a single library for Jolt. So instead, let's set BUILD_SHARED_LIBS
to off when adding the project, which will build Jolt as a static
library and joltc as a shared library (linking to the static library).
That way we just end up with a single shared library that contains both
joltc and Jolt.
2024-05-07 12:28:46 -07:00
bjorn
2cb11cffb0
Update Jolt;
2024-05-04 02:08:38 -07:00
bjorn
0b522382e1
Update changelog;
2024-05-03 20:18:11 -07:00
bjorn
010ffee736
Fix Shape:getInertia;
2024-05-03 13:34:24 -07:00
bjorn
979dd044d8
Add contact callback and Contact object;
2024-05-03 13:28:47 -07:00
bjorn
bee947a1d0
Update lovr-http;
2024-05-03 10:55:03 -07:00
bjorn
836189edbe
New mass API;
...
- All of the mass properties have regular getters/setters
- :get/setMass
- :get/setInertia
- :get/setCenterOfMass
- You can use nil for any of the setters to set the mass property to an
"automatic" value, computed from the shape and/or other overridden
mass properties.
- If you override the mass properties, we assume you know what you're
doing and don't try to be sneaky and auto-update downstream values.
So changing the mass or center of mass doesn't auto-scale the inertia.
- If you change the shape (or enabled axes), mass data gets reset.
- You can use :resetMass to reset all 3 mass properties at once. It's
also useful if something about the underlying shape changed.
2024-05-02 23:39:55 -07:00
bjorn
c23a0c04c0
Add velocitySteps/positionSteps options to newWorld;
2024-05-02 18:13:14 -07:00
bjorn
fcd8230e94
Add lock around activation listener;
2024-05-01 20:08:04 -07:00
bjorn
3733485433
Fixed timestep physics interpolation;
2024-05-01 20:08:03 -07:00
bjorn
d42915fb00
Collider shape is required; newCollider takes shape last;
2024-05-01 20:05:25 -07:00
bjorn
68aaba9f09
Shape:getMass/Inertia/Center/MassData;
2024-04-30 16:37:55 -07:00
bjorn
ce217ddbb1
Shape:get/setDensity;
2024-04-30 16:21:54 -07:00
bjorn
a8f8f157a7
Rename World:collide to :collideShape;
2024-04-30 15:33:12 -07:00
bjorn
186a085ada
Shape:getVolume;
2024-04-30 04:56:47 -07:00
bjorn
30c51f240b
World:collide;
2024-04-30 03:24:49 -07:00
bjorn
f25b3beaaf
Queries and raycasts work more similarly;
...
They return the result if no callback is given.
2024-04-30 02:44:15 -07:00
bjorn
4858f32164
Tag filtering;
2024-04-30 01:53:43 -07:00
bjorn
1d502579b2
More tag stuff;
2024-04-29 17:43:41 -07:00
bjorn
563d6671d1
World tag improvements;
2024-04-28 12:43:13 -07:00
bjorn
828e039f8d
Mesh/terrain colliders correctly default to static;
2024-04-28 12:08:16 -07:00
bjorn
61fd59d1a2
Add missing ConeJoint bindings;
2024-04-28 11:53:38 -07:00
bjorn
90ed67c0d5
Misc cleanup;
2024-04-28 11:53:38 -07:00
bjorn
8c52cf5b01
Collider:getEnabledAxes works better;
2024-04-28 11:53:38 -07:00
bjorn
e9a3db6250
ConeJoint;
2024-04-28 11:53:38 -07:00
bjorn
ea9e512d9a
Fix ConvexShape methods;
2024-04-28 11:53:38 -07:00
bjorn
1115029fe0
Add more settings to newWorld;
2024-04-28 11:53:38 -07:00
bjorn
4dbcc15cef
Add ConvexShape methods;
2024-04-28 11:53:38 -07:00
bjorn
91072136aa
Update Jolt;
2024-04-28 11:53:38 -07:00
bjorn
a0bbc68be5
Joint colliders are optional;
...
One of the colliders can be nil to fix the joint to the world.
This currently crashes JoltC.
2024-04-27 14:23:39 -07:00
bjorn
1865cf8591
Add Collider:get/setType;
...
Deprecates Collider:is/setKinematic.
2024-04-27 13:37:31 -07:00
bjorn
9b3ace7094
WIP Collider:get/setEnabledAxes;
2024-04-27 13:37:31 -07:00
bjorn
b6b13deea6
Call NotifyShapeChanged when collider shape changes;
...
Jolt says we have to do this if the collider has joints. um...ok...
2024-04-27 13:37:31 -07:00
bjorn
ee76f3418a
World:shapecast;
2024-04-27 13:37:31 -07:00
bjorn
5f6880f8ef
Raycast adjustments;
2024-04-27 13:37:31 -07:00
bjorn
115f2e24b2
New raycast implementation;
2024-04-27 13:37:31 -07:00
bjorn
a1ea0eaceb
World:queryBox/querySphere use broad phase queries;
2024-04-27 13:37:31 -07:00
bjorn
5fee9feea8
Update Jolt;
2024-04-27 13:37:31 -07:00
bjorn
37be4a2909
Query callback use better function pointer syntax;
2024-04-26 17:17:52 -07:00
bjorn
5d7811903b
Lots of Joint stuff;
2024-04-26 17:17:51 -07:00
bjorn
795b585e75
Update Jolt;
2024-04-26 17:04:55 -07:00
bjorn
d8d194e8ec
rm Joint anchor setters;
...
For consistency, since not all the joints support them.
2024-04-23 11:24:50 -07:00