|
|
Re: Camera Movement with the mouse
[Re: Ascalon]
#139426
07/04/07 15:43
07/04/07 15:43
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
User
|
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
or You may try this... speed is depends of mouse distance from center of the screen (if more far from center, the faster turning): if(mouse_middle == 1) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; camera.pan -= (mouse_pos.x - (screen_size.x /2)) * time_step *0.1; camera.tilt += (mouse_pos.y - (screen_size.y /2)) * time_step *0.1; } Play with 0.1 if camera is turning to fast or to slow 
Never say never.
|
|
|
Re: Camera Movement with the mouse
[Re: Knuckles]
#139429
07/21/07 13:48
07/21/07 13:48
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
var varcamerapan;
while(mouse_middle == 1) { mouse_pos.x = pointer.x; mouse_pos.y = pointer.y; varcamerapan -= (mouse_pos.x - (screen_size.x /2)) * time_step *0.1; camera.tilt += (mouse_pos.y - (screen_size.y /2)) * time_step *0.1;
} while(1) { varcamerapan = camera.pan }
i dont know if it worls but it needs to be somthing like this
"empty"
|
|
|
|