When I try to use the expression "get Vertex X" (or Y or Z) it always return zero.
It seems to work fine with UV coordinates but not with the XYZ positions.
This is yet another bug or what?
I'm trying to make a better MeshEditor, but seems impossible to draw the vertices of loaded distorted meshes without knowing where they are.
Develop games in your browser. Powerful, performant & highly capable.
Sprite.VertexX(col,row) returns the displacement of that point. If 0 is returned, that point is not displaced from it's normal position.
For displacement in pixels:
for absolute position (math is fun when you're tired):
Here's an example that sets displacement of a point to what it is (AKA it does nothing):
-> Sprite: Set relative displacement at (0, 1) to XYZ(Sprite.VertexX(0, 1)*Sprite.Width, Sprite.VertexY(0, 1)*Sprite.Height, Sprite.VertexZ(0, 1)) UV(0, 0) 100 %
Hope some of that info helps.
Thanks for the information ROJOhound, that clarify everything.
Well, I must suggest changing the name of the expression to "Vertex Displacement X" then, since "Vertex X" logicaly suggest that the returned data would be maybe the relative vertex X position from the hotspot of the object, or relative vertex X position from the top left corner (since mesh points start 0 0 from there), or even the absolute position of the Vertex.
From an usability point, it would make much more sense to have an expression that returned the positions rather than displacements, since positions are much more generic data than displacements.
Displacements are derived data of two positions. But anyway....