Commit 5c50faaa authored by JOVANE Alberto's avatar JOVANE Alberto
Browse files

working on camera movement

parent 0cd57acd
......@@ -189,8 +189,9 @@ public class CamMvt : MonoBehaviour
/// <summary>
/// It detects changes in the Current Camera Mode and intialize the parameters accordingly at every frame
/// </summary>
private void check_mode_changes_and_initialize()
private void check_changes_and_initialize()
{
//1) change of state
if(current_camera_mode != camSelect.options[camSelect.value].text)
{
//PREVIOUS CAMERA deinitialization
......@@ -299,6 +300,16 @@ public class CamMvt : MonoBehaviour
smooth_y_torsum = agent_torsum_transform.position.y;
}
}
//2) change of agent id
if (follow_Id != _previous_follow_Id && activateFollow)
{
update_follow_target();
}
if (lookAt_Id != _previous_lookAt_Id && activateLookAt)
{
update_look_at_target();
}
}
#endregion
......@@ -354,24 +365,14 @@ public class CamMvt : MonoBehaviour
void Update()
{
#region UPDATE VALUES
// ----------------------------
// UPDATE VALUES
// update follow id
/// ----------------------------
/// UPDATE VALUES --------------
/// ----------------------------
readCameraMovParamOnScene();
check_mode_changes_and_initialize();
check_changes_and_initialize();
check_for_events();
if (follow_Id != _previous_follow_Id && activateFollow)
{
update_follow_target();
}
if (lookAt_Id != _previous_lookAt_Id && activateLookAt)
{
update_look_at_target();
}
#endregion
#region ROTATION
// ------------------------------
// ROTATION - LOOKING AT AN AGENT
......
Markdown is supported
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