Commit f9140077 authored by juliette bonnard's avatar juliette bonnard
Browse files

Rotation caméra sur l'axe y

parent 143454a5
......@@ -5,12 +5,12 @@ using UnityEngine;
public class TourneCamera : MonoBehaviour
{
public float speed = 0.5f;
public float rotateX = 1;
public float rotateY = 0;
public float rotateZ = 0;
private bool stop = true;
private float speed = 0.3f;
// Start is called before the first frame update
void Start()
......@@ -23,21 +23,16 @@ public class TourneCamera : MonoBehaviour
{
if (!stop)
{
transform.Rotate(new Vector3(100f * rotateX, 100f * rotateY, 100f * rotateZ) * Time.deltaTime * speed);
transform.Rotate(new Vector3(50f * rotateX, 50f * rotateY, 50f * rotateZ) * Time.deltaTime * speed);
}
}
public void changeParam(float speed, float rotateX, float rotateY, float rotateZ)
public void Rotate(float rotateX, float rotateY, float rotateZ)
{
this.speed = speed;
this.rotateX = rotateX;
this.rotateY = rotateY;
this.rotateZ = rotateZ;
}
public void Rotate()
{
stop = false;
}
......@@ -47,4 +42,10 @@ public class TourneCamera : MonoBehaviour
stop = true;
}
public void setRotation(float x, float y, float z)
{
transform.localRotation = Quaternion.Euler(x, y, z);
}
}
This diff is collapsed.
......@@ -17,7 +17,7 @@
<sequence xsi:type="ExternalScenario" id="ExternalScenario_0_0" label="Scenario tomo" maxLoop="0" file="./Tomo.xml">
<extendedInfo>
<sevenEditorExtension xmlns="">
<position x="1173.696" y="-105.341125" />
<position x="1172.696" y="-106.341125" />
</sevenEditorExtension>
</extendedInfo>
</sequence>
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment