gamecreator Posted July 13, 2017 Share Posted July 13, 2017 Not sure if it's a bug or an inconsistency but I've been using model->GetSurface()->SetVertexPosition() and noticed that the Y height of a vertex is actually controlled in the negative Z direction. In other words, to go up (higher from the terrain or water plane), you need to decrease the Z value, as opposed to the expected increasing Y. Also, the parameters section here is wrong.https://www.leadwerks.com/learn?page=API-Reference_Object_Surface_AddVertex Link to comment Share on other sites More sharing options...
Josh Posted February 28, 2019 Share Posted February 28, 2019 I think your model is rotated? My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
gamecreator Posted March 1, 2019 Author Share Posted March 1, 2019 I don't follow. If you SetVertexPosition(0, 0, 1, 0) a vertex, shouldn't that put that vertex at 1 above (Y component) the world origin, no matter what? Link to comment Share on other sites More sharing options...
Josh Posted March 1, 2019 Share Posted March 1, 2019 Nope, vertex positions are local. If the object is rotated that won't match the world coordinate system. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
gamecreator Posted March 1, 2019 Author Share Posted March 1, 2019 Odd, especially considering that I didn't rotate the model in either Max or via code. How could it consider the model rotated by default? Is this another default Max setting thing? Also, what's an equivalent function for global use where the rotation of the model is irrelevant? I was trying to make a Worms-type game where I raise vertices to make hills. Link to comment Share on other sites More sharing options...
Josh Posted March 1, 2019 Share Posted March 1, 2019 The FBX converter is probably automatically rotating it to get the right orientation, since I think max uses a z-up convention. This is what you need: https://www.leadwerks.com/learn?page=API-Reference_Object_Math_Transform_Point My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts