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
2 registered members (AndrewAMD, TipmyPip), 12,672 guests, and 5 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
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