www.jpct.net

jPCT-AE - a 3d engine for Android => Bugs => Topic started by: kololo on May 23, 2011, 12:14:56 am

Title: some camera angle some object display below ground
Post by: kololo on May 23, 2011, 12:14:56 am
i modify sample project of jpct and chang rock is tank , when i rotate camara to some angle the tree display below ground (look at pic rhe tree has position near redbox) how to fix it.
regard
"http://image.free.in.th/show.php?id=eb944d702cfdac2feadc5c89bd7fe0d7"  
Title: Re: some camera angle some object display below ground
Post by: EgonOlsen on May 23, 2011, 10:16:40 am
Forget about the emulator! Its software renderer renders all kinds of bugs. It's not usuable for actual development, get a real device and check the results again.
Title: Re: some camera angle some object display below ground
Post by: kololo on May 23, 2011, 11:05:10 am
i use galaxy s to debug this resource and it display sam emulater . T-T
but it buatiful display plees help me how to fix it.

regrad.
kololo
Title: Re: some camera angle some object display below ground
Post by: EgonOlsen on May 23, 2011, 11:39:47 am
Is the ground plane set to be transparent (even with a very high value)?
Title: Re: some camera angle some object display below ground
Post by: kololo on May 23, 2011, 09:53:02 pm
no .

i chang this code form sample code to load ground plane
Code: [Select]
plane = Loader.load3DS(res.openRawResource(R.raw.plane01),100);and make the camera flollow tank object by equation x = a+r*sin(angle of boject) : y = b+r*cos(angle of object)
Code: [Select]
cam.setPosition((float)(tankh.getTransformedCenter().x+150*Math.sin(((touchTurnA+1)/360*2*Math.PI)-Math.PI/180*5)), tankh.getTransformedCenter().y-50,
(float)(tankh.getTransformedCenter().z+150*Math.cos((((touchTurnA+1)/360)*2*Math.PI)-Math.PI/180*5)));
cam.lookAt(tankh.getTransformedCenter());
regard
Title: Re: some camera angle some object display below ground
Post by: EgonOlsen on May 23, 2011, 11:32:01 pm
Doesn't make much sense to me then. The GPU's zbuffer should take care of this unless the plane is transparent, which can result in sorting errors of that kind. Can you post a screen shot from the problem when running it on the Galaxy S?
Title: Re: some camera angle some object display below ground
Post by: kololo on May 25, 2011, 06:16:42 pm
PIC url
http://image.free.in.th/show.php?id=59030926381294232166132ca999bd18

my camera is broken. but i use DDM capture 2 image , if you want real picture camera pless tell me.
Title: Re: some camera angle some object display below ground
Post by: EgonOlsen on May 25, 2011, 08:18:56 pm
Strange...i have no idea what should cause this, except for: