Gamestudio Links
Zorro Links
Newest Posts
Trouble getting data with IB Gateway
by richs. 07/16/20 03:12
Futures with IB
by jbhunter. 07/16/20 01:08
A9
by 3run. 07/15/20 19:07
Maximum Value
by AndrewAMD. 07/15/20 12:50
What are you working on?
by NeoDumont. 07/14/20 23:06
Engine window and DPI scaling
by Dooley. 07/14/20 20:27
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
10 registered members (3run, AndrewAMD, richs, kvm, onoff, Michael_Schwarz, Quad, 20BN, JeyKey II, FLD), 385 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Estripa, nowater, dasanc, DavidFdez, TraderKevin
18478 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Get a camera position with fsin fcos? #480101
05/20/20 12:26
05/20/20 12:26
Joined: Mar 2018
Posts: 11
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 11
Hi
I working on a flight sim and a "passing by camera". The idea is to place the (staedy!) camera about 3000 in front of the plane (or Player.pan) and a little to the right side. So if the plane is at postion 0,0,0 the camera.x should be at plane.x + 3000 (plane.pan! angle), and plane.y + 1000 (a little to the ight). the hight could be + 200.
The plane is also tilting, this should be bypassed, Panorama only please.

Any ideas??
Many thanks in Advance!

Re: Get a camera position with fsin fcos? [Re: NicolaB] #480102
05/20/20 13:11
05/20/20 13:11
Joined: May 2009
Posts: 5,276
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,276
Caucasus
Hey!

I would use something like this:
Code
VECTOR temp_vec;
vec_set(&temp_vec, vector (3000, 1000, 200)); // offset
vec_rotate(&temp_vec, vector (plane->pan, 0, 0)); // panorama only
vec_add(&temp_vec, &plane->x);

Last edited by 3run; 05/20/20 13:23.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Re: Get a camera position with fsin fcos? [Re: 3run] #480103
05/20/20 13:16
05/20/20 13:16
Joined: Mar 2018
Posts: 11
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 11
Hi 3run! Thanks you!

I will try it … let you know how it works out...

Re: Get a camera position with fsin fcos? [Re: NicolaB] #480104
05/20/20 13:24
05/20/20 13:24
Joined: May 2009
Posts: 5,276
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,276
Caucasus
Made some changes (missed "panorama only" part in your message), check them out.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Re: Get a camera position with fsin fcos? [Re: 3run] #480105
05/20/20 13:53
05/20/20 13:53
Joined: Mar 2018
Posts: 11
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 11
Thank you 3Run! Now it works fine! But still I had to pass by the tilt, so it looks like this:

if(vec_dist(camera.x,player.x) > 3300){

vec_set(cpassby, vector (2900, 800, 200));// Keep below if-distance!!
vec_rotate(cpassby, vector(player.pan,0,0)); // Vector -> JUST PAN , NO TILT OR ROLL angles! <-
vec_add(cpassby, player.x);
}

Re: Get a camera position with fsin fcos? [Re: NicolaB] #480106
05/20/20 13:54
05/20/20 13:54
Joined: Mar 2018
Posts: 11
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 11
Ah we just did the same XD

Re: Get a camera position with fsin fcos? [Re: NicolaB] #480107
05/20/20 14:11
05/20/20 14:11
Joined: May 2009
Posts: 5,276
Caucasus
3run Online
Senior Expert
3run  Online
Senior Expert

Joined: May 2009
Posts: 5,276
Caucasus
Hehe, I'm glad it worked out well :>


Looking for free stuff?? Take a look here: http://badcom.at.ua
Re: Get a camera position with fsin fcos? [Re: NicolaB] #480108
05/20/20 15:20
05/20/20 15:20
Joined: Mar 2018
Posts: 11
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 11
Hi 3Run, another Question you might can help me:

I would like to have a Reply function, that shows the last 5-10 seconds again.
I know there was an AUM tutorial that did that, but i don`t remember which one.
It worked like storing postions and states of several level entities Frame by Frame into a file, and as Reply started, just reading it out again.

Re: Get a camera position with fsin fcos? [Re: NicolaB] #480109
05/20/20 15:50
05/20/20 15:50
Joined: Mar 2018
Posts: 11
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 11
Hello ! I found it: it`s in AUM 70


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