Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 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: 15
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 15
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,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
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
Support me on: https://boosty.to/3rung
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: 15
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 15
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,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
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
Support me on: https://boosty.to/3rung
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: 15
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 15
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: 15
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 15
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,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

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


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
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: 15
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 15
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: 15
N
NicolaB Offline OP
Newbie
NicolaB  Offline OP
Newbie
N

Joined: Mar 2018
Posts: 15
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