get coordinates of a physic terrain

Posted By: Widi

get coordinates of a physic terrain - 01/07/11 18:39

If i want to get the coordinates of a terrain in a physX level, all positions of all terrains are 0 (x=0,y=0,z=0).

See also this topic
Posted By: Widi

Re: get coordinates of a physic terrain - 01/16/11 23:36

bump
Posted By: jcl

Re: get coordinates of a physic terrain - 01/17/11 13:12

A chunked terrain has no position. Its vertices have absolute level coordinates, so the position is 0.
Posted By: Widi

Re: get coordinates of a physic terrain - 01/19/11 11:32

Thank you for the answer. But my terrain is in my "terrain edit mode" unchunked. If i don`t use the physic (physX_open) i get the right coordinates of every terrain, dut as soon i set the physic engine, all my terraincoordinates return zero.
If this is NOT a bug i have already a workaround: I load my level new if i switch to my "terrain edit mode" with set the physic off (physX_destroy).
Posted By: jcl

Re: get coordinates of a physic terrain - 01/19/11 13:59

Terrain is always chunked in A8. You can use this workaround, but be aware that the terrain vertices have absolute level coordinates. So the terrain position does not add to the vertex positions. They behave as if the position were 0.
Posted By: Superku

Re: get coordinates of a physic terrain - 01/19/11 14:17

Widi, why don't you use my much simpler workaround (as suggested in the linked topic)? I think that's a nicer way than reloading the level.
Posted By: Widi

Re: get coordinates of a physic terrain - 01/19/11 16:28

Thank for explain it.
@ Superku:
Yes, your solution is better, But i don`t know if you know my "DEFORM TERRAIN" from the last contest. This is a script that all should include in their project and there i don`t can handle your solution..
© 2024 lite-C Forums