mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
added log for helping placing props floating in zero 0
This commit is contained in:
parent
fc4ae7d3c7
commit
67a2200920
@ -108,6 +108,28 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
DebugRaycastData data = _rc.Raycast();
|
||||
PlaceObject(data, this.gameObject.transform.position);
|
||||
|
||||
//use DropItem logic to make props not clip through the ground when placed
|
||||
|
||||
//public virtual void DropItem(Vector3 position, Vector3 normal, Transform parent, Sector sector, IItemDropTarget customDropTarget)
|
||||
//{
|
||||
// base.transform.SetParent(parent);
|
||||
// base.transform.localScale = Vector3.one;
|
||||
// Quaternion quaternion = Quaternion.FromToRotation(base.transform.TransformDirection(_localDropNormal), normal);
|
||||
// base.transform.rotation = quaternion * base.transform.rotation;
|
||||
// base.transform.position = position + base.transform.TransformDirection(_localDropOffset);
|
||||
// if (_parentFragment != null)
|
||||
// {
|
||||
// _parentFragment.OnChangeSector -= OnParentFragmentChangeSector;
|
||||
// }
|
||||
// _parentFragment = customDropTarget as DetachableFragment;
|
||||
// if (_parentFragment != null)
|
||||
// {
|
||||
// _parentFragment.OnChangeSector += OnParentFragmentChangeSector;
|
||||
// }
|
||||
// SetSector(sector);
|
||||
// SetColliderActivation(active: true);
|
||||
//}
|
||||
|
||||
if (!hasAddedCurrentObjectToRecentsList)
|
||||
{
|
||||
hasAddedCurrentObjectToRecentsList = true;
|
||||
|
||||
@ -95,6 +95,10 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
_planeDownRightSphere.transform.localPosition = data.plane.origin + data.plane.u*1*planeSize + data.plane.v*-1*planeSize;
|
||||
|
||||
Logger.Log($"Raycast hit \"position\": {posText}, \"normal\": {normText} on [{data.bodyName}] at [{data.bodyPath}]");
|
||||
var ppos = data.hitBodyGameObject.GetComponent<AstroObject>().GetRootSector().transform.InverseTransformPoint(Locator.GetPlayerTransform().position);
|
||||
posText = $"{{\"x\": {ppos.x}, \"y\": {ppos.y}, \"z\": {ppos.z}}}";
|
||||
Logger.Log($"Player, relative to raycasted sector \"position\": {posText} on [{data.bodyName}] at [{data.bodyPath}]");
|
||||
|
||||
}
|
||||
internal DebugRaycastData Raycast()
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user