mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 18:39:23 +00:00
Automatic locomotion mass center
Animated bend normal while jumping/flying Arm weights fix Mod remake
This commit is contained in:
parent
f2b63303eb
commit
cb26ab1e6c
16 changed files with 773 additions and 96 deletions
|
@ -16,7 +16,7 @@ namespace ml_lme
|
|||
static readonly Quaternion ms_offsetRightDesktop = Quaternion.Euler(0f, 270f, 0f);
|
||||
|
||||
VRIK m_vrIK = null;
|
||||
Vector2 m_armsWeights = Vector2.zero;
|
||||
Vector4 m_armsWeights = Vector2.zero;
|
||||
bool m_inVR = false;
|
||||
Transform m_hips = null;
|
||||
Transform m_origLeftHand = null;
|
||||
|
@ -350,14 +350,19 @@ namespace ml_lme
|
|||
|
||||
void OnIKPreUpdate()
|
||||
{
|
||||
m_armsWeights.Set(m_vrIK.solver.leftArm.positionWeight, m_vrIK.solver.rightArm.positionWeight);
|
||||
m_armsWeights.Set(
|
||||
m_vrIK.solver.leftArm.positionWeight,
|
||||
m_vrIK.solver.leftArm.rotationWeight,
|
||||
m_vrIK.solver.rightArm.positionWeight,
|
||||
m_vrIK.solver.rightArm.rotationWeight
|
||||
);
|
||||
|
||||
if(m_leftTargetActive && Mathf.Approximately(m_armsWeights.x, 0f))
|
||||
if(m_leftTargetActive && (Mathf.Approximately(m_armsWeights.x, 0f) || Mathf.Approximately(m_armsWeights.y, 0f)))
|
||||
{
|
||||
m_vrIK.solver.leftArm.positionWeight = 1f;
|
||||
m_vrIK.solver.leftArm.rotationWeight = 1f;
|
||||
}
|
||||
if(m_rightTargetActive && Mathf.Approximately(m_armsWeights.y, 0f))
|
||||
if(m_rightTargetActive && (Mathf.Approximately(m_armsWeights.z, 0f) || Mathf.Approximately(m_armsWeights.w, 0f)))
|
||||
{
|
||||
m_vrIK.solver.rightArm.positionWeight = 1f;
|
||||
m_vrIK.solver.rightArm.rotationWeight = 1f;
|
||||
|
@ -366,10 +371,9 @@ namespace ml_lme
|
|||
void OnIKPostUpdate()
|
||||
{
|
||||
m_vrIK.solver.leftArm.positionWeight = m_armsWeights.x;
|
||||
m_vrIK.solver.leftArm.rotationWeight = m_armsWeights.x;
|
||||
|
||||
m_vrIK.solver.rightArm.positionWeight = m_armsWeights.y;
|
||||
m_vrIK.solver.rightArm.rotationWeight = m_armsWeights.y;
|
||||
m_vrIK.solver.leftArm.rotationWeight = m_armsWeights.y;
|
||||
m_vrIK.solver.rightArm.positionWeight = m_armsWeights.z;
|
||||
m_vrIK.solver.rightArm.rotationWeight = m_armsWeights.w;
|
||||
}
|
||||
|
||||
void RestoreVRIK()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyTitle("LeapMotionExtension")]
|
||||
[assembly: AssemblyVersion("1.3.0")]
|
||||
[assembly: AssemblyFileVersion("1.3.0")]
|
||||
[assembly: AssemblyVersion("1.3.1")]
|
||||
[assembly: AssemblyFileVersion("1.3.1")]
|
||||
|
||||
[assembly: MelonLoader.MelonInfo(typeof(ml_lme.LeapMotionExtension), "LeapMotionExtension", "1.3.0", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
|
||||
[assembly: MelonLoader.MelonInfo(typeof(ml_lme.LeapMotionExtension), "LeapMotionExtension", "1.3.1", "SDraw", "https://github.com/SDraw/ml_mods_cvr")]
|
||||
[assembly: MelonLoader.MelonGame(null, "ChilloutVR")]
|
||||
[assembly: MelonLoader.MelonPlatform(MelonLoader.MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonLoader.MelonPlatformDomain(MelonLoader.MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||
|
|
|
@ -12,15 +12,15 @@ This mod allows you to use your Leap Motion controller for hands and fingers tra
|
|||
# Usage
|
||||
## Settings
|
||||
Available mod's settings in `Settings - Implementation - Leap Motion Tracking`:
|
||||
* **Enable tracking:** enable hands tracking from Leap Motion data, disabled by default.
|
||||
* **Tracking mode:** set Leap Motion tracking mode, available values: `Screentop`, `Desktop` (by default), `HMD`.
|
||||
* **Enable tracking:** enables/disables hands tracking from Leap Motion data, disabled by default.
|
||||
* **Tracking mode:** sets Leap Motion tracking mode, available values: `Screentop`, `Desktop` (by default), `HMD`.
|
||||
* **Desktop offset X/Y/Z:** offset position for body attachment, (0, -45, 30) by default.
|
||||
* **Attach to head:** attach hands transformation to head instead of body, disabled by default.
|
||||
* **Attach to head:** attaches hands transformation to head instead of body, disabled by default.
|
||||
* **Head offset X/Y/Z:** offset position for head attachment (`Attach to head` is **`true`**), (0, -30, 15) by default.
|
||||
* **Offset angle X/Y/X:** rotation around specific axis, useful for neck mounts, 0 by default.
|
||||
* **Track elbows:** elbows tracking, works best in `Screentop` and `HMD` tracking modes, `true` by default.
|
||||
* **Fingers tracking only:** apply only fingers tracking, disabled by default.
|
||||
* **Model visibility:** show Leap Motion controller model, useful for tracking visualizing, disabled by default.
|
||||
* **Fingers tracking only:** applies only fingers tracking, disabled by default.
|
||||
* **Model visibility:** shows Leap Motion controller model, useful for tracking visualizing, disabled by default.
|
||||
* **Interaction input:** enables in-game interactions (props, menu and etc.); `true` by default.
|
||||
* **Interact gesture threadhold:** activation limit for interaction based on hand gesture; 80 by default.
|
||||
* **Grip gesture threadhold:** activation limit for grip based on hand gesture; 40 by default.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue