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
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 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
how can create camera with smooth rotate (pan .. #154084
09/14/07 14:45
09/14/07 14:45
Joined: Jul 2007
Posts: 69
fat32 Offline OP
Junior Member
fat32  Offline OP
Junior Member

Joined: Jul 2007
Posts: 69
HI.
how can i create a camera with smooth rotate (pan & tilt).
thank's

this is my project but is not smooth rotate
_____________________________________________________________________________
_____________________________________________________________________________

path "img";
string level_str = <new.WMB>; // give file names in angular brackets
//Title: main WDL(new.wdl)
//section: Cam Option
//entry:factor x(tilt) for move speed cam
var facX_cam_sped_mov_var=1;
//entry:factor y(pan) for move speed cam
var facy_cam_sped_mov_var=1;
function main_camera_func {
while(1){
wait(1);
////////////////////////////////////////////////////////////////////////////
if(mouse_force.y>0 && camera.tilt<60){//if last pos bigger of now pos then camera rotate up
camera.tilt+=facy_cam_sped_mov_var*time;
}
if(mouse_force.y<0&& camera.tilt>-60)//if last pos smaller of now pos then camera rotate up
{
camera.tilt-=facy_cam_sped_mov_var*time;
}
//////////////////////////////////////////////////////////////////////////
if(mouse_force.x<0){//if last pos bigger of now pos then camera rotate up
camera.pan+=facX_cam_sped_mov_var*time;
}
if(mouse_force.x>0)//if last pos smaller of now pos then camera rotate up
{
camera.pan-=facX_cam_sped_mov_var*time;
}
////////////////////////////////////////////////////////////////////////////


}
}


function main
{
video_switch(7,32,1);
level_load(level_str);
wait(5);
main_camera_func();
mouse_mode=0;
fps_max=30;
}


dobidob hosein_dig and max_man7000 game

HAPPY NEW YEAR !!
Re: how can create camera with smooth rotate (pan .. [Re: fat32] #154085
09/14/07 15:31
09/14/07 15:31
Joined: Apr 2007
Posts: 249
Louisana, USA
Ilidrake Offline
Member
Ilidrake  Offline
Member

Joined: Apr 2007
Posts: 249
Louisana, USA
I've been looking into this myself. As soon as I have something I'll post it here for you.


Just Because Your Paranoid Doesn't Mean They Aren't After You...Because They Really Are

http://spearbang.awardspace.com/news.php
Re: how can create camera with smooth rotate (pan .. [Re: Ilidrake] #154086
09/14/07 15:41
09/14/07 15:41
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
A simple approach could be adding a smooth value in the pan and tilt calculations, not tested:
Ex:
camera.tilt+=facy_cam_sped_mov_var*0.2*time; //play with value

hope it helps.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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