-
-
Notifications
You must be signed in to change notification settings - Fork 159
Description
Background: In Jolt, when you create a slider, you have to specify a frame of reference for both colliders. This consists of a point (can be in world space or relative to the collider), a slider axis, and a normal axis.
We currently aren't specifying the 2 points at all, they're both at 0,0,0, which causes sliders to not behave as expected. There's an option called AutoDetectPoint, but we don't use it. I tried using it, but it picks a single anchor point between the two colliders, weighted by mass, which maybe isn't very useful. Instead, LÖVR should probably use the positions of the 2 colliders as the 2 points.
Additionally there's the issue of the slider axis and normal axis. We currently use a helper function SetSliderAxis for this, which computes the normal axis as any vector perpendicular to the main slider axis. This is probably okay.