Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,577 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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 | chip programmers | 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