hey guys how do i instantiate a game object
so that it only spawns in the spawn point and it does not have a vactor 3 needed becous it stays at the spawnpoint
it would be like this i think
var target1 :Gameobject
var destination : Transform;
function Update() {
if( Input.GetKeyDown( "1" ) ){
var prefab:Transform;
var spawn_point:Transform; //==destination
function Update()
{
if( Input.GetKeyDown( "1" ) )
{
Instantiate(prefab, spawn_point.position, Quaternion.identity);
//U can use any rotation instead of Quaternion.identity
//e.g. spawn_point.rotation
}
}
If you dont want rigidbody create new prefab without this component and all instantiated objects will be without rigidbody.