mirror of
https://github.com/ConjureETS/VZ.git
synced 2026-03-24 02:11:15 +00:00
add z-axis offset to the cameras
This commit is contained in:
parent
49470678d8
commit
e71ce63d66
@ -90,6 +90,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
y: 25
|
||||
offsetZ: -5
|
||||
transitionDuration: .100000001
|
||||
--- !u!124 &12432070
|
||||
Behaviour:
|
||||
|
||||
@ -90,6 +90,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
y: 25
|
||||
offsetZ: -5
|
||||
transitionDuration: .100000001
|
||||
--- !u!124 &12404998
|
||||
Behaviour:
|
||||
|
||||
@ -5,6 +5,7 @@ public class SquadCamera : MonoBehaviour {
|
||||
|
||||
private Vector3 target;
|
||||
public float y = 25f; // store the height value since it will never change
|
||||
public float offsetZ = -5f;
|
||||
|
||||
public float transitionDuration = 2.5f;
|
||||
|
||||
@ -35,7 +36,7 @@ public class SquadCamera : MonoBehaviour {
|
||||
|
||||
float t = 0.0f;
|
||||
Vector3 startingPos = transform.position;
|
||||
Vector3 destination = new Vector3( target.x, y, target.z );
|
||||
Vector3 destination = new Vector3( target.x, y, target.z + offsetZ); // add the offset
|
||||
|
||||
while (t < 1.0f) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user