Jump to content

Recreating the worldToCameraMatrix


Recommended Posts

I have some issues using a camera's worldToCameraMatrix in KSP, the result I get seems to be always delayed by one frame, or acts in weird ways. Either these work weird in KSP or KSP does something weird where it moves objects but doesn't update their transforms where you rotate the camera (this is unlikely).

Anyway, my question is, how do I recreate that amtrix by myself using the camera's transform? I know you need the camera's transform but this is where math fails me (a snippet of code instead of an analytical explanation would be highly appreciated).

Edited: Ignore this thread, I found the problem and it's somehting so much simpler.

Edited by blackrack
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...