www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Thomas. on June 26, 2011, 11:25:04 am

Title: Change UV
Post by: Thomas. on June 26, 2011, 11:25:04 am
How to change UV on plane? Is there any method like setUV() on vertex?
Title: Re: Change UV
Post by: EgonOlsen on June 26, 2011, 10:20:38 pm
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.
Title: Re: Change UV
Post by: Thomas. on June 26, 2011, 10:27:50 pm
I want to do some scale effect, object is for collisions, so I will try apply scale matrix on texture...
Title: Re: Change UV
Post by: EgonOlsen on June 26, 2011, 10:36:55 pm
Yes, that should be easier and faster.