Displacing chunked terrain never works right

Posted By: Matt_Aufderheide

Displacing chunked terrain never works right - 01/06/17 18:39

I trying to displace terrain by using ent_setvertex....
using the simple example from the manual:

int i = ent_status(terrain_ent,0);
for (; i>0; i--)
{ CONTACT* c = ent_getvertex(terrain_ent,NULL,i);
c.v.y += 100.0;
ent_setvertex(terrain_ent,c,i);
}

mostly works but always the edges of each chunk are not changed properly. I have set up terrain like this:

terrain_chunk=32;
ent_createterrain(NULL, vector(0,0,0),64,64,2048);

everything looks right to me... so why is this happening?
Posted By: txesmi

Re: Displacing chunked terrain never works right - 01/07/17 15:34

Did you try passing 1 as entity status mode?
Posted By: Matt_Aufderheide

Re: Displacing chunked terrain never works right - 01/08/17 22:43

Thanks, that doesn't solve it... but I found the problem...it turns out that if you assign a material that has a tangent flag, it messes up your displacement...odd..all works fine when I turn off the tangent flag.. fortunately I don't need it.
© 2024 lite-C Forums