vec_for_vertex and polygons

Posted By: TWO

vec_for_vertex and polygons - 03/22/07 19:37

With vec_for_vertex you can get the relative position of a vertex. So is it true that 3 following numbers build a triangle (polygon)?

So this would give me the first triangle of the entity:
Code:

var vert1, vert2, vert3;

vec_for_vertex(vert1,1);
vec_for_vertex(vert2,2);
vec_for_vertex(vert3,3);



Or are the vertex numbers from MED like you build the modell (random)?

Thanks
Posted By: Scorpion

Re: vec_for_vertex and polygons - 03/22/07 20:08

they are "random"
Posted By: TWO

Re: vec_for_vertex and polygons - 03/22/07 20:10

Sh*t! Hmm, ok any other ideas?

Ok, what I need is all polygons of the level to build an exact duplicate of the it (only modells / meants I need 3 vectors with the position of the current polygon)
Posted By: Scorpion

Re: vec_for_vertex and polygons - 03/23/07 12:02

i am not sure what you want with it and maybe there is a better way..., because you cant create vertexes or faces; you can just move vertexes...

edit: maybe u can do something as the position relative to the objects origin and go trought all vertexes and this which have the same position is the right one...
Posted By: xXxGuitar511

Re: vec_for_vertex and polygons - 03/23/07 13:59

I needed to do a similar thing. I was hoping to create a script to calculate lighting for models, but I couldn't find the faces...
Posted By: TWO

Re: vec_for_vertex and polygons - 03/23/07 15:22

I need this for a sound plugin. With that you would be able to hear the sounds quieter and have other cool effects behind walls and in special rooms. But hey, let's ask Conitec.
Posted By: xXxGuitar511

Re: vec_for_vertex and polygons - 03/23/07 15:53

I tried, JCL simply said that I should look into writing a plugin using DX mesh commands. Unfortunatly, I don'y know sh*t about C++
Posted By: xXxGuitar511

Re: vec_for_vertex and polygons - 03/23/07 15:55

I just gave more thought to your project. How are you going to tell where the sound is? I could see how a trace would work to tell if theres somethin in the way, but how are you going to use model polygons to do this? (I'm assuming your using model-based levels...)
Posted By: TWO

Re: vec_for_vertex and polygons - 03/23/07 16:40

Easy. I'm using FMOD for my plugin, I just have to pass all polygons of the level and turn on the effect modifier.

Ok, this is a good solution, I should have known that myselfe Thanks
© 2024 lite-C Forums