Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, dr_panther), 791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | 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