Hi, I’m working on a stealth game where the enemy ai patrols a series of waypoints. My issue is that when the game starts, the AI spawns in face-down instead of right-side-up WITHOUT falling over, if that make sense.
The enemy is just a simple cube with a face on it, and for some reason it doesn’t spawn in as I have it set up in the “Scene” view (where they are facing the way they are supposed to.)
Please help me out, guys. I really have been having a hard time with this project and the AI is not making it any easier 
I can supply the enemy scripts if anybody wants/needs them…
The third parameter to the Instantiate() specifies the initial rotation of the instantiated gameobject. Sounds like you need to rotate that quaternion by 90 degrees counter-clockwise around the x axis.
UPDATE:
It Seems that applying a NavMeshAgent component break the model, causing it to go face-down. Here’s the script I’m using on the enemy that accesses the NavMesh…
// Patrol.js
var points: Transform[];
var destPoint: int = 0;
var agent: GameObject;
function Start() {
// Disabling auto-braking allows for continuous movement
// between points (ie, the agent doesn't slow down as it
// approaches a destination point).
GotoNextPoint();
}
function GotoNextPoint() {
// Returns if no points have been set up
if (points.Length == 0)
return;
// Set the agent to go to the currently selected destination.
agent.destination = points[destPoint].position;
// Choose the next point in the array as the destination,
// cycling to the start if necessary.
destPoint = (destPoint + 1) % points.Length;
}
function Update() {
// Choose the next destination point when the agent gets
// close to the current one.
if (agent.remainingDistance < 0.5f)
GotoNextPoint();
}
Any Ideas?~