camera location + rotation & object location and rotation.
pretty new to unity, so this is probably a stupid issue but its been 50 minutes googling and its annoying.
basicly i got a very simple rocket model object out of blender, i already fixed the 90° angle issue in blender itself, the model seems to be correctly in my unity scene.
i placed the camera, following a YT tutorial on how to keep it following the rocket with
public Transform rocket;
public Vector3 offset;
void Update()
{
transform.position = rocket.position + offset ;
}
but when i press play, and i press my left arrow key to rotate the rocket ( vertically, like rockets do) the rocket actually comes towards the camera, instead of going to the left, at first i thought i had my controls mixed up, but its actually the camera being LEFT of the rocket, instead of facing it from the rear/ front what ever you want to call it.
incase my controls are wrong and not the camera
if (Input.GetKey("space") && fuelandengine.getFuel() >= 0)
{
float forceActual = force * 1000;
rb.AddForce(transform.up * forceActual * Time.deltaTime);
fuelandengine.fuelLiters -= fuelConsumption * Time.deltaTime;
Console.WriteLine("im pressing space");
}
if (Input.GetKey("left"))
{
rb.transform.Rotate(Vector3.left * rotSpeed * Time.deltaTime);
}
edit// also i know the Console.WriteLine doesnt work... i havent chekked yet how to write that properly in untiy3d but thats not an issue right now.
I tried importing the blender file differently but didn’t help. thanks in advance.
Your answer
