www.jpct.net
jPCT-AE - a 3d engine for Android => Support => Topic started by: gamenewer on September 20, 2014, 07:45:47 am
-
Hello , I use Primitives.getPlane to create a plane to show texture , bu t how can I change the create plane size ? for e.g set x = 128 and set y = 256 so plane can fit to show image? thanks
-
I use this code:
Object3D obj = new Object3D(2);
float x = 64;
float y = 128;
SimpleVector s1 = new SimpleVector(-x/2,y/2,0);
SimpleVector s2 = new SimpleVector(-x/2,-y/2,0);
SimpleVector s3 = new SimpleVector(x/2,-y/2,0);
SimpleVector s4 = new SimpleVector(x/2,y/2,0);
obj.addTriangle(s1,s2,s3);
obj.addTriangle(s1,s3,s4);
and set texture , but see nothing ~~~ :( what's wrong ?
-
mmm, add obj.invert(); and set correct u v . It seems ok! :)