Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
3rd person game camera position #260876
04/14/09 11:13
04/14/09 11:13
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
I'm making like a 3rd person game...
I just having trouble playing the camera so it would stick above my main character whenever I move... how I could do that?

I tried to have a sample code like this:
vec_set(camera.x, my.x);

but it looks to be as a 1st person camera position...

Any idea? Thanks

Re: 3rd person game camera position [Re: boyax] #260878
04/14/09 11:38
04/14/09 11:38
Joined: Aug 2005
Posts: 512
Bayern
Schmerzmittel Offline
User
Schmerzmittel  Offline
User

Joined: Aug 2005
Posts: 512
Bayern
Hiho...

try this: 3rd Person Camera Code - Download

In the script you can find a good help for your problem.

Greetings
Schmerzmittel


A7 Com V7.80
Re: 3rd person game camera position [Re: Schmerzmittel] #260912
04/14/09 16:08
04/14/09 16:08
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Thanks Schmerzmittel.

It's good you've also translated the readme file..
this really helps..

Thanks

Re: 3rd person game camera position [Re: boyax] #260982
04/15/09 04:01
04/15/09 04:01
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Schmerzmittel,

Just have a question...

What's the definition for HeroMoves??
Code:
void control_Camera(ENTITY* dummy)
{

//dummy = my, Mob ect.
me = dummy;


//=================================////=================================//
//
// Wenn Rechte Maustaste gedrückt, der Spieler ab steht
//
//=================================////=================================//

if((mouse_right == 1) && (HeroMoves == 0))


I've got it as compiler error...

Pls. advise. Thanks.

Re: 3rd person game camera position [Re: boyax] #260983
04/15/09 04:32
04/15/09 04:32
Joined: Aug 2005
Posts: 512
Bayern
Schmerzmittel Offline
User
Schmerzmittel  Offline
User

Joined: Aug 2005
Posts: 512
Bayern
Ups. Sorry.


Code:
if ((key_w) | | (key_a) | | key (s) | | (key_s)) 
( 
    HeroMoves = 1 
) 
else 
( 
    HeroMoves = 0 
) 



Make HeroMoves as a simple global value. Initalisise it by 0.

This should work. The HeroMoves value only change, if you press a wasd key or whatever you took for movement.

Hope this helps.

Last edited by Schmerzmittel; 04/15/09 04:37.

A7 Com V7.80
Re: 3rd person game camera position [Re: Schmerzmittel] #261211
04/16/09 11:04
04/16/09 11:04
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
Thanks.


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