Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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