fr.jeanf.universal.player 0.8.50 → 0.8.52

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.
@@ -32,7 +32,7 @@ namespace jeanf.universalplayer
32
32
  GetPrimaryInHandItemWithVRController.OnIpadStateChanged += ctx => HandleCollidersForSpecificHand(ctx);
33
33
  controlSchemeChangeEvent.OnEventRaised += CheckXRStatus;
34
34
  PrimaryItemController.TriggerLastUsedHand += HandleColliders;
35
- }
35
+ }
36
36
  private void OnDisable()
37
37
  {
38
38
  TakeObject.OnGrabDeactivateCollider -= HandleColliders;
@@ -45,7 +45,7 @@ namespace jeanf.universalplayer
45
45
  private void Update()
46
46
  {
47
47
  float distance = Vector3.Distance(transform.position, target.position);
48
- if(distance > showNonPhysicalHandDistance)
48
+ if (distance > showNonPhysicalHandDistance)
49
49
  {
50
50
  nonPhysicalHand.SetActive(true);
51
51
  }
@@ -54,17 +54,17 @@ namespace jeanf.universalplayer
54
54
  nonPhysicalHand.SetActive(false);
55
55
  }
56
56
  }
57
- void LateUpdate()
57
+ void FixedUpdate()
58
58
  {
59
- rb.linearVelocity = (target.position - transform.position)/Time.deltaTime;
60
-
59
+ rb.linearVelocity = (target.position - transform.position) / Time.fixedDeltaTime;
60
+
61
61
 
62
- Quaternion rotationDifference = target.rotation * Quaternion.Inverse(transform.rotation*offset);
62
+ Quaternion rotationDifference = target.rotation * Quaternion.Inverse(transform.rotation * offset);
63
63
  rotationDifference.ToAngleAxis(out float angleInDegree, out Vector3 rotationAxis);
64
64
 
65
65
  Vector3 rotationDifferenceInDegree = angleInDegree * rotationAxis;
66
66
 
67
- rb.angularVelocity = (rotationDifferenceInDegree * Mathf.Deg2Rad/Time.deltaTime);
67
+ rb.angularVelocity = (rotationDifferenceInDegree * Mathf.Deg2Rad / Time.deltaTime);
68
68
  }
69
69
 
70
70
  private void CheckXRStatus()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fr.jeanf.universal.player",
3
3
 
4
- "version": "0.8.50",
4
+ "version": "0.8.52",
5
5
 
6
6
  "displayName": "Universal Player",
7
7
  "description": "This package contains a universal player working in URP & HDRP for Mouse+Keyboard or VR",