Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
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
3 registered members (AndrewAMD, kzhao, alibaba), 627 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Over the shoulder cam? #184884
02/21/08 07:37
02/21/08 07:37
Joined: Dec 2006
Posts: 18
M
mackmodius Offline OP
Newbie
mackmodius  Offline OP
Newbie
M

Joined: Dec 2006
Posts: 18
Hello,everyone. I'm in dire need of a script for an over-the-shoulder camera like the one in resident evil 4 or gears of war. And if possible a script that transitions from a standard 3rd person cam when weapon is holstered to the over the shoulder cam when weapon is drawn. If any1 can help I would be HIGHLY greatful. Thanks.

Re: Over the shoulder cam? [Re: mackmodius] #184885
02/21/08 08:48
02/21/08 08:48
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Never played those games but if they show the players head to one side then an 'entity view' may be the way to go which can be a bit of a pain to script as all your required player animations that can be seen thru the entity view needs to be scripted in, not an easy task.
Without this view you will most likely get clipping issues where your player entity appears to be cut and consequently, 'seen thru' as thoug the model is unfinished.

Perhaps some one knows how to work a round this already, I dont know.

Other wise, a standard first person camera offset by the position of the camera on the shoulder will do the trick for you or any one who may be prepared to script this for you.

Just so you understand if no one takes up your request.

Re: Over the shoulder cam? [Re: Nems] #184886
02/21/08 14:57
02/21/08 14:57
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
its possible to do without a view entity, if my old western demo is still up i might be able to find the code from that but it is very primitive and unfinished......


just checked and it was hosted by rapidshare, so it isnt still up sorry....
but if you wanted to see what it looked like :



Re: Over the shoulder cam? [Re: lostclimate] #184887
02/21/08 19:06
02/21/08 19:06
Joined: Feb 2008
Posts: 337
V
Vadim647 Offline
Senior Member
Vadim647  Offline
Senior Member
V

Joined: Feb 2008
Posts: 337
Maybe you can try this one:
Code:

//in begin
var t_v[3];
var camera_mode;
//in main()
camera.clip_near = 0;
//in main > loop
if (camera_mode==4)//
{
vec_set(t_v,vector(player.min_x,player.max_y,player.max_z * 0.8));
vec_rotate(t_v,player.pan);
vec_add(t_v,player.x);
vec_set(camera.x,t_v);
vec_set(camera.pan,player.pan);
}


I switched to other account since marth 2010. Guess which.
Re: Over the shoulder cam? [Re: Vadim647] #184888
02/21/08 21:59
02/21/08 21:59
Joined: Dec 2006
Posts: 18
M
mackmodius Offline OP
Newbie
mackmodius  Offline OP
Newbie
M

Joined: Dec 2006
Posts: 18
Okay, I really appriciate all the help and advice you guys gave,thank you.I'm trying to learn c-script and vadim647 could you please enlighten me on what exactly is goin on in your code.When you put player.x for example are you talking about my player's name plus the x position?Oh and Lostclimate that's exactly the kind of veiw I'm looking for.Anymore help or responses will be great.Thanks.

Re: Over the shoulder cam? [Re: mackmodius] #184889
02/23/08 18:23
02/23/08 18:23
Joined: Feb 2008
Posts: 337
V
Vadim647 Offline
Senior Member
Vadim647  Offline
Senior Member
V

Joined: Feb 2008
Posts: 337
that's simple.
Normaly, you can use predefined 'player' entity*.
You can same use something like:
Code:

//in begin
ENTITY* my_player_ent;
var t_v[3];
var camera_mode;
//in main()
camera.clip_near = 0;
//in main > loop
if (camera_mode==4)//
{
vec_set(t_v,vector(my_player_ent.min_x,my_player_ent.max_y,my_player_ent_z * 0.8));
vec_rotate(t_v,my_player_ent.pan);
vec_add(t_v,my_player_ent.x);
vec_set(camera.x,t_v);
vec_set(camera.pan,my_player_ent.pan);
}


so then you make in beginning of player entity action:
Code:

action human_controlled =
{
my_player_ent = me;
}




I switched to other account since marth 2010. Guess which.

Moderated by  adoado, checkbutton, mk_1, Perro 

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