Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, 1 invisible), 620 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Vector Arrays (i'm not very good at them) #276289
07/04/09 08:28
07/04/09 08:28
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline OP
User
the_mehmaster  Offline OP
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Ok so i have my definitions:
Code:
VECTOR vertice[7];
vertice[5].x = 100; vertice[5].y = 0; vertice[5].z = -100;
//other vertex definitions..


And a line to set a variable to a value(somewhere else):
Code:
verticestoreval = vertice[5].x;



Then comes my problem.
For some reason verticestoreval is always 0. It should be 100!
Can someone help?

Re: Vector Arrays (i'm not very good at them) [Re: the_mehmaster] #276418
07/04/09 23:34
07/04/09 23:34
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline OP
User
the_mehmaster  Offline OP
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
This is an important issue for my project. I need it answered..

Doesn't anyone know?

Re: Vector Arrays (i'm not very good at them) [Re: the_mehmaster] #276420
07/04/09 23:41
07/04/09 23:41
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Where is your vector definition : VECTOR vertice[7];
Inside a function or outside?

Try
Quote:


vec_set ( VECTOR* vector1, VECTOR* vector2)
Copies the second vector to the first, thus overwriting the first vector.



Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: Vector Arrays (i'm not very good at them) [Re: Ottawa] #276429
07/05/09 00:21
07/05/09 00:21
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline OP
User
the_mehmaster  Offline OP
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
That fixed it. Thanks!

Re: Vector Arrays (i'm not very good at them) [Re: the_mehmaster] #276852
07/06/09 19:16
07/06/09 19:16
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Glad to help wink


Ottawa


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