Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (RealSerious3D, rvl), 1,187 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
orbit cam #331412
07/04/10 01:28
07/04/10 01:28
Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
F
Funeral Offline OP
Junior Member
Funeral  Offline OP
Junior Member
F

Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
hey i wanna know how to get an orbit camera for a 3rd person game like super mario, etc
i need code...

Re: orbit cam [Re: Funeral] #331425
07/04/10 05:13
07/04/10 05:13
Joined: Jan 2010
Posts: 145
Doc_Savage Offline
Member
Doc_Savage  Offline
Member

Joined: Jan 2010
Posts: 145



thats your best bet.
other than that, there should be somthing in the manual

other than that: http://www.devonlively.com/

Last edited by Doc_Savage; 07/04/10 05:18.

Do not concern yourself with my race, personality or origin. find my record in the pits, and then make your wager.
Re: orbit cam [Re: Doc_Savage] #331459
07/04/10 11:29
07/04/10 11:29
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
there is a camera library which comes with gamestudio and has a lot of different cameras


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: orbit cam [Re: Doc_Savage] #331982
07/07/10 00:39
07/07/10 00:39
Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
F
Funeral Offline OP
Junior Member
Funeral  Offline OP
Junior Member
F

Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
i've found this code there where you recommnded me but it has some mistakes aparently... there are error messages like "var undeclared identifier"

void plyr()
{



var cam_angle = 0; // set the initial camera angle here
var zoom = 200;
VECTOR temp;

set(my,TRANSLUCENT);
my.alpha = 100;

while(1)
{
wait(1);
zoom += 2 * (key_pgup - key_pgdn) * time_step;

dist_to_wall = c_trace(camera.x,my.x,IGNORE_ME|IGNORE_PASSABLE);

if(dist_to_wall != 0)
{
tempZoom = 10;
}
else
{
tempZoom = 0;
}

cam_height += 3 * (key_cuu - key_cud) * time_step;
cam_height = clamp(cam_height, 50, 300);

zoom += 2 * (key_pgup - key_pgdn - tempZoom) * time_step;
zoom = clamp(zoom, 20, 500);

my.alpha = zoom;
my.alpha = clamp(my.alpha,10,100);

camera.x = my.x - zoom * cos(cam_angle);
camera.y = my.y - zoom * sin(cam_angle);
camera.z = my.z + cam_height;

cam_angle += 5 * (key_cur - key_cul) * time_step; // 5 gives the camera rotation speed

vec_set(temp.x, my.x);
vec_sub(temp.x, camera.x);
vec_to_angle(camera.pan, temp); // rotate the camera towards the player at all times

my.x += key_w - key_s;
my.y += key_a - key_d;
}
}

void main()
{
fps_max = 60;
video_mode = 6; // 6=640x480 7=800*600 8=1024x768 9=1280x960
video_depth = 16; // 16 bit colour D3D mode

video_switch(0,0,2); // 1 = Full Screen 2 = window
tex_share = 1; // when set to on all entities share their textures saving memory
level_load("test.wmb"); //load the level
}

Re: orbit cam [Re: Funeral] #331988
07/07/10 03:37
07/07/10 03:37
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Take a look at my "GRAVITY" project(you can find it at my website), is that what you need? The way camera works there I mean. And if so (or you just need help with that), PM me just wink I'll try to finger out.

Last edited by 3run; 07/07/10 03:37.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: orbit cam [Re: 3run] #332345
07/09/10 01:15
07/09/10 01:15
Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
F
Funeral Offline OP
Junior Member
Funeral  Offline OP
Junior Member
F

Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
no i think that gravity project is 2d and am looking for an orbit cam in a 3rd person game in 3d


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