Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Algorithm: mouse_pos3d and mouse_dir3D #426394
07/22/13 18:35
07/22/13 18:35
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Hello brothers!
somebody could describe the algorithm functioning of these two functions for me?

I have an interest in creating these processes manually!.

thank you in this moment.


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Algorithm: mouse_pos3d and mouse_dir3D [Re: NeoNeper] #426434
07/23/13 08:28
07/23/13 08:28
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I think mouse_pos3d works like this:

Code:
//
				
				vec_set( pos1 , vector(mouse_pos.x,mouse_pos.y,0) );
				vec_for_screen (pos1, camera);
				
				vec_set( pos2 , vector(mouse_pos.x,mouse_pos.y,50000) ); // should be a big value       		
				vec_for_screen (pos2, camera);
			
				c_trace (pos1, pos2, IGNORE_CONTENT);



and mouse_dir3D probably points towards to this hit point from camera position.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Algorithm: mouse_pos3d and mouse_dir3D [Re: sivan] #426495
07/23/13 19:03
07/23/13 19:03
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
thank sivan!
Can show you step by step of the mouse_dir3D to?
Is what I'm most interested


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Algorithm: mouse_pos3d and mouse_dir3D [Re: NeoNeper] #426496
07/23/13 19:25
07/23/13 19:25
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
just a question,
is not the algorithm of vec_for_screen the underlying problem to be clarified?

Re: Algorithm: mouse_pos3d and mouse_dir3D [Re: txesmi] #426500
07/23/13 20:33
07/23/13 20:33
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
also! Really!


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Algorithm: mouse_pos3d and mouse_dir3D [Re: NeoNeper] #426501
07/23/13 20:52
07/23/13 20:52
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
it was just a gues, I don't use them because I've met them only a short time ago in the manual, I use the above mentioned script.


Free world editor for 3D Gamestudio: MapBuilder Editor

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1