Vector Arrays (i'm not very good at them)

Posted By: the_mehmaster

Vector Arrays (i'm not very good at them) - 07/04/09 08:28

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?
Posted By: the_mehmaster

Re: Vector Arrays (i'm not very good at them) - 07/04/09 23:34

This is an important issue for my project. I need it answered..

Doesn't anyone know?
Posted By: Ottawa

Re: Vector Arrays (i'm not very good at them) - 07/04/09 23:41

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.

Posted By: the_mehmaster

Re: Vector Arrays (i'm not very good at them) - 07/05/09 00:21

That fixed it. Thanks!
Posted By: Ottawa

Re: Vector Arrays (i'm not very good at them) - 07/06/09 19:16

Hi!

Glad to help wink


Ottawa
© 2024 lite-C Forums