Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 984 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
over the shoulder cam ala Resi Evil 4/Gears of war #132436
05/28/07 08:38
05/28/07 08:38
Joined: Dec 2006
Posts: 18
M
mackmodius Offline OP
Newbie
mackmodius  Offline OP
Newbie
M

Joined: Dec 2006
Posts: 18
I was wondering can anyone point me in the right direction or give any insight on how I would go about creating an resi evil 4/gears of war cam. Also, I would need more help on implementing it into a system where when the character's weapon is put away, the cam would be in a 3rd person/free cam view then when the weapon is drawn(by pressing a button) the cam would smoothly(or not) transition into over the shoulder cam. Any and all help no matter the size is greatly appreciated. Thanks.

Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: mackmodius] #132437
05/28/07 09:45
05/28/07 09:45
Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
Dj_Pint Offline
Senior Member
Dj_Pint  Offline
Senior Member

Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
something like this should work:
shoulder:

vec_set(camera.pan,player.pan); }
camera.x=player.x-100*cos(camera.pan+30);
camera.y=player.y-100*sin(camera.pan+30);
camera.z=player.z+30;

other cam:

camera.x=player.x-camera_distance*cos(camera.pan)*cos(camera.tilt);
camera.y=player.y-camera_distance*sin(camera.pan)*cos(camera.tilt);
camera.z=player.z-camera_distance*sin(camera.tilt);

should work or something, greez pint


if u want to see some stuff i made, go to youTube and search for djpint, not dj pint^^
Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: Dj_Pint] #132438
05/29/07 03:10
05/29/07 03:10
Joined: Dec 2006
Posts: 18
M
mackmodius Offline OP
Newbie
mackmodius  Offline OP
Newbie
M

Joined: Dec 2006
Posts: 18
The view from Ballern (Daylight dreams) is exactly the kind of camera I need. Is that what you posted above? Thanks! Now I need to figure out how to switch between the camera angles when the weapon is drawn from it's holstered position when I press a certain button. I need the cam to pull in. Anymore help would be the shizzol;) Also, how in the hell do I add the camera script to my game? I thought I knew how but..... I don't.


Last edited by mackmodius; 05/29/07 05:44.
Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: mackmodius] #132439
05/29/07 08:53
05/29/07 08:53
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
F.e. You may do it like this:
Code:
 
var camera_number
function hold_camera
{
while(player != 0)
{
if(camera_number ==0)
{
First camera position, behaviour, fog, arc... etc
}
if(camera_number ==1)
{
second camera position, behaviour, fog, arc... etc
}
if(camera_number ==2)
{
third camera position, behaviour, fog, arc... etc
}
wait(1);
}
}

function change_camera
{
camera_number %= 3;
camera_number +=1;
}

on_r change_camera;




Never say never.
Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: tompo] #132440
05/29/07 18:17
05/29/07 18:17
Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
Dj_Pint Offline
Senior Member
Dj_Pint  Offline
Senior Member

Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
jo this is the cam of daylightdreams. just copy the script of tompo and add the camera stuff i wrote and then it worx^^

greez, pint


if u want to see some stuff i made, go to youTube and search for djpint, not dj pint^^
Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: Dj_Pint] #132441
05/30/07 04:52
05/30/07 04:52
Joined: Dec 2006
Posts: 18
M
mackmodius Offline OP
Newbie
mackmodius  Offline OP
Newbie
M

Joined: Dec 2006
Posts: 18
I don't know where to put any of this. I've been trying for the last day. I simply don't understand what you guys are talking about. When I try to put it in game and replace the standard cameras I don't see where to put it. I'm a noob and don't really know what the hell is goin on. I need a lil' more depth in the explanation you guy's are giving me. HELP!!!!!!!!!!!! I'm trying to learn the scripting language by doing the workshops and stuff but like I said, I'm a noob. HELP!!!!!!!!!!!!!!!

Last edited by mackmodius; 05/30/07 04:54.
Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: mackmodius] #132442
05/30/07 08:29
05/30/07 08:29
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
ok... from the beggining... sorry for my poor english...
1. camera is the name of template view (main view)
2. you can change camera's parameters by script using loops to make effects all the time
3. so if You write:
Code:
 
function camera_code
{
while(player != 0) //if player is in the level
{
vec_set(camera.x, player.x); //place camera at player position
wait(1);
}
}


camera will be all the time on players position. You may add this function in your main wdl and call it at the and of main function
camera_code();

4. What I've wrote in your post is the same but pressing "r" you'll change camera's parameters. So It will be still the same camera (view) but will be placed in different positions.

5. where I've wrote camera.arc...etc... replace it with what dj_pint wrote

So...
Code:
 
var camera_number; //number to change camera behaviour
var camera_dist[3] = -100,0,50; //vector to place camera relative to player
function hold_camera
{
while(player != 0) //if player is in the level
{
if(camera_number ==0) //if firs view
{
vec_set(camera.x, player.x); //camera at player position
camera.z = player.z + 50; //height of "eyes"
camera.pan = player.pan; //look where player is looking
}
if(camera_number ==1) //if second view
{
vec_set(temp, player.x);
vec_add(temp, camera_dist);
vec_set(camera.x,temp);
vec_set(temp,player.x);
vec_sub(temp,camera.x);
vec_to_angle(camera.pan,temp);

}
wait(1);
}
}

function change_camera
{
camera_number %= 2; //modulo = only 0 and 1
camera_number +=1; //change camera_number
}

on_r change_camera; //pressing "r" change camera_number



Or You may this easer just changing camera_dist vector
At the and of main function in main wdl write: hold_camera(); then paste all of those codes to your main script.
Code:
 
var camera_number; //number to change camera behaviour
var camera_dist[3]; //vector to place camera relative to player
function hold_camera
{
while(player != 0) //if player is in the level
{
if(camera_number ==0) //if first view
{
camera_dist = vector(0,0,50); //at player position but 50 quants up (eye height)
camera.pan = player.pan; //camera is looking in the same direction with player
}
if(camera_number ==1) //if second view
{
camera_dist = vector(-100,0,50); // 100 quants behind player
vec_set(temp,player.x); //where is the player
vec_sub(temp,camera.x); //where is camera
vec_to_angle(camera.pan,temp); //camera looks at player
}
vec_set(temp, player.x); //where is the player
vec_add(temp, camera_dist); //add distance to player position
vec_set(camera.x,temp); //set camera at this position

wait(1);
}
}

function change_camera
{
camera_number %= 2; //modulo = only 0 and 1
camera_number +=1; //change camera_number
}

on_r change_camera; //pressing "r" change camera_number



Last edited by tompo; 05/30/07 09:04.

Never say never.
Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: tompo] #132443
05/30/07 21:37
05/30/07 21:37
Joined: Dec 2006
Posts: 18
M
mackmodius Offline OP
Newbie
mackmodius  Offline OP
Newbie
M

Joined: Dec 2006
Posts: 18
Now that's an explaination! Thanks for taking time out to help a noob. I appriciate that.

Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: mackmodius] #132444
06/05/07 05:02
06/05/07 05:02
Joined: Dec 2006
Posts: 18
M
mackmodius Offline OP
Newbie
mackmodius  Offline OP
Newbie
M

Joined: Dec 2006
Posts: 18
Yet and still I don't know where to put it. I give on this.

Re: over the shoulder cam ala Resi Evil 4/Gears of [Re: mackmodius] #132445
06/05/07 20:01
06/05/07 20:01
Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
Dj_Pint Offline
Senior Member
Dj_Pint  Offline
Senior Member

Joined: Feb 2006
Posts: 302
Beienrode/NDS/GERMANY
didnt you recieved my instructzions?
u put it in the level.wdl datei below the main() function


if u want to see some stuff i made, go to youTube and search for djpint, not dj pint^^

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

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