aStiffSausage Posted June 4, 2013 Share Posted June 4, 2013 How I can get 2D screen coordinates to 3D? Or, alternatively, get the point where player is aiming? Link to comment Share on other sites More sharing options...
DK22Pac Posted June 4, 2013 Share Posted June 4, 2013 :getAimPoint{ Parameters: Passed: [email protected] - aiming range [email protected] - start point X [email protected] - start point Y [email protected] - start point Z Result: [email protected] - camera point X [email protected] - camera point Y [email protected] - camera point Z [email protected] - aim point X [email protected] - aim point Y [email protected] - aim point Z Example: 0AB1: call_scm_func @getAimPoint 4 range 20.0 from 0.0 0.0 0.0 camera_to [email protected] [email protected] [email protected] point_to [email protected] [email protected] [email protected] }0A9F: [email protected] = current_thread_pointer0AB1: call_scm_func @getLocalVarOffset 2 thread [email protected] var 4 store_to [email protected] 0AB1: call_scm_func @getLocalVarOffset 2 thread [email protected] var 7 store_to [email protected] 0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 pPoint [email protected] pCamera [email protected] fZ [email protected] fY [email protected] fX [email protected] fRange [email protected] 0AB2: ret 6 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] http://www.gtaforums.com/index.php?showtop...st&p=1060189069 Link to comment Share on other sites More sharing options...
aStiffSausage Posted June 5, 2013 Author Share Posted June 5, 2013 Alright, thanks, I'll probably get the script working now! But, next question. When aiming, let's say M4, the camera mode is 53, and the first person camera mode used when aiming with sniper is 7. When I set camera mode to 7 with opcode 0159 while aiming with M4, it works otherwise well, the camera goes to first person and I can move the camera, but I can't shoot up or down even though the camera does move. Any solution to that, or alternative way to get first person? Link to comment Share on other sites More sharing options...
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