Im using the rocket launcher gun script for the spawning of a special bullet and the bullet is spawned in its regular rotation. normally I'd alter the model, but the texture doesnt fit onto that orientation. can anyone tell me how to spawn it at a certain angle or tell me how to edit my textures so that they're set straight?
If you are using Object.Instantiate then there's an argument for rotation:
function Instantiate (original : Object, position : Vector3, rotation : Quaternion) : Object
So you'd type something like:
var bulletPrefab: GameObject;
var gunPosition;
var gunRotation;
if (shooting){
Instantiate (bulletPrefab, gunPosition, gunRotation);
}
If the bullet is modelled side ways you can create an empty game object, place the bullet in the game object facing the right way and save the prefab with the game object and bullet model.