Hi,
I am a bit stuck with how to write a line of C# code…
The following is the “setup” for the gameobject in the scene I am working on.
-
I have a spawned #1gameobject that follows a path.
-
This #1gameobject hits a trigger which Instantiates a new #2Gameobject that falls to the ground using a Rigidbody. This #2Gameobject rotates as it falls.
-
The groundplane has a collider that acts as a trigger to Instantiate smaller #3Gameobjects when the falling #2Gameobject hits it.
-
These smaller #3Gameobjects beeline to a target at the center of the ground.
The above all works well, with one problem… I need the #3Gameobjects to Instantiate with a 0,0,0 rotation. I am fairly certain that my Instantiate line of code needs to state a 0,0,0, but am not sure of how to state it.
I’m really new to coding, so if anyone can provide some help I’d appreciate it… or point out a good place to look for syntax and examples so that I might be able to figure out the answer myself.
Thanks ahead of time, I appreciate it!
-Kory
GameObject goTroop = (GameObject)Instantiate(enemyTroop, transform.position, transform.rotation);