Grozz Posted October 4, 2020 Share Posted October 4, 2020 Any ideas how can I calculate the camera perspective's 4 corners into a flat 2D map? Here's what the camera should see: And here is what should it look like from the outside: I need to calculate the 4 points position Link to comment
Moderators IIYAMA Posted October 4, 2020 Moderators Share Posted October 4, 2020 59 minutes ago, Grozz said: I need to calculate the 4 points position I think the following function might be able to do that. https://wiki.multitheftauto.com/wiki/GetWorldFromScreenPosition If you use the function on: 4 corners + with a little depth (START) 4 corners + a lot of depth (END) Per corner check if there is collision between START and END: https://wiki.multitheftauto.com/wiki/ProcessLineOfSight You might be able to get the end result that you want. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now