Gamestudio Links
Zorro Links
Newest Posts
Purchase A8 full licence version
by ukgamer. 04/29/26 18:09
Z9 getting Error 058
by k_ivan. 04/25/26 19:13
ZorroGPT
by TipmyPip. 04/25/26 16:09
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 5,733 guests, and 39 spiders.
Key: Admin, Global Mod, Mod
Newest Members
ukgamer, valino, juergenwue, VladMak, Geir
19210 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Roll affecting tilt angle? #187506
03/08/08 05:35
03/08/08 05:35
Joined: Aug 2003
Posts: 716
Canada, Toronto
thegamedesigner Offline OP
User
thegamedesigner  Offline OP
User

Joined: Aug 2003
Posts: 716
Canada, Toronto
I started making a small flight sim game:


action plane1_act
{
my.health = 100;
while(1)
{

//controls
my.roll += (key_d - key_a) * 2 * time;
my.tilt += (key_s - key_w) * 2 * time;

//movement
c_move(my,vector(32 * time,0,0),nullvector,ignore_passable);

//camera
vec_set(camera.x,vector(-1900,-1900,1300));//x,y,z,offsets
vec_rotate(camera.x,vector(my.pan,0,0));//based on pan AND tilt
vec_add(camera.x,my.x);

vec_set(temp.x,my.x);
vec_sub(temp.x, camera.x);
vec_to_angle(camera.pan,temp);

wait(1);
}
}

Very basic. However, when I roll to the side and then tilt up or down, my plane (no matter the roll angle) tilts straight up and down.

I know I solved this before, but I can't find the answer.


My games - www.spyeart.com
Re: Roll affecting tilt angle? [Re: thegamedesigner] #187507
03/08/08 05:46
03/08/08 05:46
Joined: Aug 2003
Posts: 716
Canada, Toronto
thegamedesigner Offline OP
User
thegamedesigner  Offline OP
User

Joined: Aug 2003
Posts: 716
Canada, Toronto
Sorry, never mind, I found out how to use c_rotate.


My games - www.spyeart.com

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