So I’m trying to make a game where you play as a marble, and the marble rotates around the world. I want to have a camera follow it, but I don’t want the camera to rotate around it’s parent, the marble. I also have the game movement set up to work just fine. What I do want it to do is stay fixated at its current rotation and still follow the marble. Just a side note, I prefer any scripting to be done in Javascript. Thank you.
As you saw, having the camera childed on the marble follows position and rotation, and there’s no way to “check off” copying rotation. You have to unchild the cam.
Then have the camera code say “I’m always 10 back and 5 up from my target.” Disclaimer: I use C#, this is my attempt at unity/jScript:
target : Transform; // drag in marble (same as every other cam script)
Update() {
transform.position = target.position + Vector3(0, 5, -10);
}
The better cam scripts set the aim position like above, both use MoveTowards or Lerp, with LookAt, to give the camera some play as you move around.