Change UV

Started by Thomas., June 26, 2011, 11:25:04 AM

Previous topic - Next topic

Thomas.

How to change UV on plane? Is there any method like setUV() on vertex?

EgonOlsen

Yes, the PolygonManager allows you to set a polygons texture and that includes uv...this works only if the object hasn't been stripped and if it has been build by calling build(false);. After modifying the coordinates, touch() has to be called on the object to promote the changes. However, updating uv isn't particularly fast. You might want to consider to use a texture matrix instead...that might not work on some older phones (like G1), but if you target newer devices only, that doesn't matter.

Thomas.

I want to do some scale effect, object is for collisions, so I will try apply scale matrix on texture...

EgonOlsen

Yes, that should be easier and faster.