mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
use origin instead of transform.position
This commit is contained in:
parent
6c7c02d71c
commit
642c179eaf
@ -128,8 +128,8 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
data.pos = hitInfo.rigidbody.transform.InverseTransformPoint(hitInfo.point);
|
||||
data.norm = hitInfo.rigidbody.transform.InverseTransformDirection(hitInfo.normal);
|
||||
|
||||
var toPlayer = Vector3.ProjectOnPlane((transform.position - hitInfo.point).normalized, hitInfo.normal);
|
||||
var worldSpaceRot = Quaternion.LookRotation(toPlayer, hitInfo.normal);
|
||||
var toOrigin = Vector3.ProjectOnPlane((origin - hitInfo.point).normalized, hitInfo.normal);
|
||||
var worldSpaceRot = Quaternion.LookRotation(toOrigin, hitInfo.normal);
|
||||
data.rot = hitInfo.rigidbody.transform.InverseTransformRotation(worldSpaceRot);
|
||||
|
||||
data.colliderPath = hitInfo.collider.transform.GetPath();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user