Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 938 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Need some help with camera-script #306732
01/24/10 15:24
01/24/10 15:24
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Hi there,

I need some help with my spaceship-code.
Everything works fine but I have still some problems with the camera.
I'd like to have the camera x quants higher than the ship. In the Game pan, tilt and roll changes. So
camera.z = a_ship.z + x;
surely won't work. If roll is 180 camera would be under the ship.
My question now is how I can set the camera position to a_ship.z+x in the Model-coords not the world-coords.
or
Is there any way to get the coordinates of a vertex?
Maybe I can attach the camera at one...

Kartoffel


POTATO-MAN saves the day! - Random
Re: Need some help with camera-script [Re: Kartoffel] #306734
01/24/10 15:36
01/24/10 15:36
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
hey laugh

if you want to attach it to a vertex:

vec_for_vertex(camera.x, a_ship, your_vertex_number);


laugh

Re: Need some help with camera-script [Re: Kartoffel] #306735
01/24/10 15:39
01/24/10 15:39
Joined: Mar 2009
Posts: 40
DR_Black Offline
Newbie
DR_Black  Offline
Newbie

Joined: Mar 2009
Posts: 40
place a vertex where you want camera to stick to and then use vec_for_vertex to obtain the coordinates


every body got some dues in life to pay
Re: Need some help with camera-script [Re: DR_Black] #306742
01/24/10 16:23
01/24/10 16:23
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline OP
Expert
Kartoffel  Offline OP
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
thank you for the fast reply.
You helped me alot! smile

Last edited by Kartoffel; 01/24/10 16:24.

POTATO-MAN saves the day! - Random

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