Minifix for better client navigation near seats
This commit is contained in:
parent
8ba1513020
commit
1c8711561b
3 changed files with 15 additions and 14 deletions
|
@ -117,7 +117,7 @@ BoxCollider2D:
|
|||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 1
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0.0008151531, y: 0.09807843}
|
||||
|
@ -178,10 +178,10 @@ NavMeshObstacle:
|
|||
m_GameObject: {fileID: 5304524770463492230}
|
||||
m_Enabled: 0
|
||||
serializedVersion: 3
|
||||
m_Shape: 1
|
||||
m_Extents: {x: 0.15, y: 0.1, z: 0.00001}
|
||||
m_Shape: 0
|
||||
m_Extents: {x: 0.25, y: 0.275, z: 0.25}
|
||||
m_MoveThreshold: 0.1
|
||||
m_Carve: 1
|
||||
m_CarveOnlyStationary: 1
|
||||
m_Center: {x: 0, y: 0.1, z: 0}
|
||||
m_TimeToStationary: 0.5
|
||||
m_Center: {x: 0, y: 0.2, z: 0}
|
||||
m_TimeToStationary: 0.1
|
||||
|
|
|
@ -3122,7 +3122,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 380775747}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -4.09, y: -0.31, z: 2.5482712}
|
||||
m_LocalPosition: {x: -4.113, y: -0.325, z: 2.5482712}
|
||||
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1863361785}
|
||||
|
@ -3558,7 +3558,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 837069666}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -0.83, y: -0.76, z: 2.5482712}
|
||||
m_LocalPosition: {x: -0.878, y: -0.784, z: 2.5482712}
|
||||
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1863361785}
|
||||
|
@ -3588,7 +3588,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 885015723}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -4.63, y: -0.74, z: 2.5482712}
|
||||
m_LocalPosition: {x: -4.63, y: -0.815, z: 2.5482712}
|
||||
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1863361785}
|
||||
|
@ -32709,7 +32709,7 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1756509214}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -3.4, y: -2.64, z: 2.5482712}
|
||||
m_LocalPosition: {x: -3.4, y: -2.6, z: 2.5482712}
|
||||
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1863361785}
|
||||
|
@ -32728,12 +32728,12 @@ NavMeshObstacle:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1810629360}
|
||||
m_Enabled: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Shape: 0
|
||||
m_Extents: {x: 0.2, y: 0.2, z: 0.2}
|
||||
m_MoveThreshold: 0.1
|
||||
m_Carve: 0
|
||||
m_Carve: 1
|
||||
m_CarveOnlyStationary: 1
|
||||
m_Center: {x: 0, y: 0.2, z: 0}
|
||||
m_TimeToStationary: 0.5
|
||||
|
|
|
@ -25,6 +25,7 @@ public class Client_controller : MonoBehaviour, IUsable
|
|||
//Switch Agent to obstacle if waiting
|
||||
if(value=="waiting")
|
||||
{
|
||||
agent.Warp(agent.destination); //Make sure agent become static at right position
|
||||
agent.enabled = false;
|
||||
navObstacle.enabled = true;
|
||||
}
|
||||
|
@ -100,7 +101,7 @@ public class Client_controller : MonoBehaviour, IUsable
|
|||
agent.updateRotation = false;
|
||||
agent.updateUpAxis = false;
|
||||
//Get target
|
||||
agent.destination = ClientManager.Instance.assignTarget();
|
||||
agent.SetDestination(ClientManager.Instance.assignTarget());
|
||||
//Assign Random priority to prevent two agent blocking each other
|
||||
agent.avoidancePriority=Random.Range(0, 99);
|
||||
|
||||
|
@ -126,7 +127,7 @@ public class Client_controller : MonoBehaviour, IUsable
|
|||
{
|
||||
//Leave tavern
|
||||
status = "leaving";
|
||||
agent.destination = ClientManager.Instance.assignTarget(agent.destination); //Request next target
|
||||
agent.SetDestination(ClientManager.Instance.assignTarget(agent.destination)); //Request next target
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,7 +149,7 @@ public class Client_controller : MonoBehaviour, IUsable
|
|||
|
||||
//Leave tavern
|
||||
status = "leaving";
|
||||
agent.destination = ClientManager.Instance.assignTarget(agent.destination); //Request next target
|
||||
agent.SetDestination(ClientManager.Instance.assignTarget(agent.destination)); //Request next target
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue