Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 04/05/26 10:06
TMFs on options in live trading
by Spirit. 03/26/26 19:52
TDAmeritrade plugin with new Schwab accountt?
by AndrewAMD. 03/24/26 17:11
Black Book, 4th edition
by jcl. 03/17/26 09:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (AndrewAMD, vince, AgentPot), 4,334 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ondrej, mredit, vestriaa, Lukudo, mldenoiser
19205 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Move a camera without c_move #250254
02/06/09 21:27
02/06/09 21:27
Joined: Sep 2003
Posts: 407
inside to my
er_willy Offline OP
Senior Member
er_willy  Offline OP
Senior Member

Joined: Sep 2003
Posts: 407
inside to my
hello

I want to move the camera on x and y using the mouse:

Code:
		//Move
		if  (mouse_left == 1)	
		{		


			vec_for_angle(tempo,camera.pan);
			
			//movimientos laterales	
			camera.x += (mouse_force.x * time_step) * tempo.y;	//movimientos laterales			
			camera.y -= (mouse_force.x * time_step) * tempo.x; //* tempo.x;	//movimientos laterales	
		
		}

tempo is a 3d vector

But my vectors and matematicals skills are too low and only get the lateral move.

someone can helpme smile thanks.


Last edited by er_willy; 02/06/09 21:27.
Re: Move a camera without c_move [Re: er_willy] #250314
02/07/09 10:28
02/07/09 10:28
Joined: Sep 2003
Posts: 407
inside to my
er_willy Offline OP
Senior Member
er_willy  Offline OP
Senior Member

Joined: Sep 2003
Posts: 407
inside to my
ok I put the code finish and working if any need

Code:
			vec_for_angle(tempo,camera.pan);
			
		//movimientos laterales	
		//	camera.x += (mouse_force.x * time_step) * tempo.tilt;	//movimientos laterales			
		//	camera.y -= (mouse_force.x * time_step) * tempo.pan; //* tempo.x;	//movimientos laterales	

			camera.x += mouse_force.y * 10* time_step* tempo.x; 		
			camera.y += mouse_force.y * 10* time_step* tempo.y;				
			camera.z += 0;//mickey.z * tempo.roll;



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