Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (SBGuy), 712 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Displacing chunked terrain never works right #463921
01/06/17 18:39
01/06/17 18:39
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
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?

Last edited by Matt_Aufderheide; 01/06/17 18:39.
Re: Displacing chunked terrain never works right [Re: Matt_Aufderheide] #463925
01/07/17 15:34
01/07/17 15:34
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Did you try passing 1 as entity status mode?

Re: Displacing chunked terrain never works right [Re: Matt_Aufderheide] #463945
01/08/17 22:43
01/08/17 22:43
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline OP
Expert
Matt_Aufderheide  Offline OP
Expert
M

Joined: Oct 2003
Posts: 4,131
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.


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