Jump to content

Camera Mod question


Nachtwind

Recommended Posts

I have a question about setting the cameras properties..

I have a vector and would like to align the games camera on to it.

FlightCamera.fetch.transform.LookAt() doesnt work unfortunately as it only shows while the game is paused...

So i think the way to go is to use camPitch and camHdg - but i simply cant see how to get Pitch/Hdg from a vector (between two points), my maths skills just dont cover this stuff i suppose :/

Does anyone have an idea how to do that? The idea is that the camera does not just "turn" to look but rather adjusts itself arround the craft to look at the target.

Thanks in advance

Link to comment
Share on other sites

I have a question about setting the cameras properties..

I have a vector and would like to align the games camera on to it.

FlightCamera.fetch.transform.LookAt() doesnt work unfortunately as it only shows while the game is paused...

It might be because KSP's camera logic is overriding your rotation changes. Try putting your changes into LateUpdate rather than Update

Link to comment
Share on other sites

That does not work. Furthermore lookat() seems to be the wrong way to do it anyway as i dont want to just turn the camera but pivot it around the craft in order to keep the target (craft) in focus.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...