Page 1 of 1

[MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Posted: Tue Sep 25, 2012 7:17 pm
by Valerian
Im trying to append some shorts into a vertex array i may show you my code:

Code: Select all

for i = 1 to 40 do(

f1=readshort f
f2=readshort f
f3=readshort f
append Faces_array[f1,f2,f3]
)
Am i doing something wrong? If you need more information to help me, just write it in here :) sorry to bother you

Re: [MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Posted: Tue Sep 25, 2012 7:18 pm
by chrrox
Just add +1 to all of them.

Re: [MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Posted: Tue Sep 25, 2012 7:20 pm
by Valerian
LOL.
It works! :D
but is there any explanation to this?

Re: [MAXSCRIPT] "Vertex index in face out of range: [0,1,2]"

Posted: Tue Sep 25, 2012 8:48 pm
by chrrox
max is a 1 based system most game engines are 0 based.