Code repair
This commit is contained in:
@@ -179,7 +179,7 @@ CapsuleCollider:
|
|||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Radius: 0.4821627
|
m_Radius: 0.4821627
|
||||||
m_Height: 50
|
m_Height: 60
|
||||||
m_Direction: 1
|
m_Direction: 1
|
||||||
m_Center: {x: 0.000000062741734, y: -4.641877, z: -0.017836753}
|
m_Center: {x: 0.000000062741734, y: -4.641877, z: -0.017836753}
|
||||||
--- !u!23 &6503152
|
--- !u!23 &6503152
|
||||||
@@ -7178,9 +7178,9 @@ CapsuleCollider:
|
|||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Radius: 0.5000001
|
m_Radius: 0.5000001
|
||||||
m_Height: 50
|
m_Height: 60.009872
|
||||||
m_Direction: 1
|
m_Direction: 1
|
||||||
m_Center: {x: 0.000000062741734, y: -4.49651, z: -0.0000000941126}
|
m_Center: {x: 0.000000062741734, y: 0.50830126, z: -0.0000000941126}
|
||||||
--- !u!23 &1386843749
|
--- !u!23 &1386843749
|
||||||
MeshRenderer:
|
MeshRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -11383,15 +11383,15 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5999486385027004331, guid: 4c53ddc4a767a214e853d6ef8e5841a1, type: 3}
|
- target: {fileID: 5999486385027004331, guid: 4c53ddc4a767a214e853d6ef8e5841a1, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: -13.138
|
value: -3.235
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5999486385027004331, guid: 4c53ddc4a767a214e853d6ef8e5841a1, type: 3}
|
- target: {fileID: 5999486385027004331, guid: 4c53ddc4a767a214e853d6ef8e5841a1, type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: -2.91
|
value: -6.89
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5999486385027004331, guid: 4c53ddc4a767a214e853d6ef8e5841a1, type: 3}
|
- target: {fileID: 5999486385027004331, guid: 4c53ddc4a767a214e853d6ef8e5841a1, type: 3}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
value: -0.63
|
value: 0.219
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5999486385027004331, guid: 4c53ddc4a767a214e853d6ef8e5841a1, type: 3}
|
- target: {fileID: 5999486385027004331, guid: 4c53ddc4a767a214e853d6ef8e5841a1, type: 3}
|
||||||
propertyPath: m_LocalRotation.w
|
propertyPath: m_LocalRotation.w
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class DraggableObject : MonoBehaviour
|
|||||||
rb.isKinematic = false;
|
rb.isKinematic = false;
|
||||||
rb.linearVelocity = Vector3.zero;
|
rb.linearVelocity = Vector3.zero;
|
||||||
_dragPlane = new Plane(-mainCamera.transform.forward, hitPoint);
|
_dragPlane = new Plane(-mainCamera.transform.forward, hitPoint);
|
||||||
targetPosition = hitPoint;
|
targetPosition = new Vector3(this.transform.position.x, hitPoint.y, hitPoint.z);
|
||||||
transform.localScale = originalScale * scaleOnDrag;
|
transform.localScale = originalScale * scaleOnDrag;
|
||||||
if (Renderer != null)
|
if (Renderer != null)
|
||||||
{
|
{
|
||||||
@@ -119,7 +119,8 @@ public class DraggableObject : MonoBehaviour
|
|||||||
float distance;
|
float distance;
|
||||||
if (_dragPlane.Raycast(ray, out distance))
|
if (_dragPlane.Raycast(ray, out distance))
|
||||||
{
|
{
|
||||||
targetPosition = ray.GetPoint(distance);
|
Vector3 hitPoint = ray.GetPoint(distance);
|
||||||
|
targetPosition = new Vector3(this.transform.position.x, hitPoint.y, hitPoint.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void EndDrag()
|
void EndDrag()
|
||||||
|
|||||||
@@ -108,9 +108,9 @@ public class ObjectSpawner : MonoBehaviour
|
|||||||
Vector3 RandomPos(float margin)
|
Vector3 RandomPos(float margin)
|
||||||
{
|
{
|
||||||
return new Vector3(
|
return new Vector3(
|
||||||
-2.24f,//Random.Range(minX + margin, maxX - margin),
|
Random.Range(-3, -4),
|
||||||
0f,//Random.Range(minY + margin, maxY - margin),
|
-0.3f,
|
||||||
0.5f
|
Random.Range(-2f, 1.5f)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ Material:
|
|||||||
- _UVSec: 0
|
- _UVSec: 0
|
||||||
- _ZWrite: 1
|
- _ZWrite: 1
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- _Color: {r: 0.58122724, g: 0.019810122, b: 0.952601, a: 1}
|
- _Color: {r: 0.938926, g: 0.15740769, b: 0.11648448, a: 1}
|
||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
m_AllowLocking: 1
|
m_AllowLocking: 1
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ Material:
|
|||||||
- _UVSec: 0
|
- _UVSec: 0
|
||||||
- _ZWrite: 1
|
- _ZWrite: 1
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- _Color: {r: 0, g: 0, b: 0, a: 0.86399686}
|
- _Color: {r: 0, g: 0, b: 0, a: 0.3599968}
|
||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
m_AllowLocking: 1
|
m_AllowLocking: 1
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 5d7070679a02c0f478502a9eac088352
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Reference in New Issue
Block a user