Hi,
I’ve looked a ton through the forums and I can’t seem to figure out how to setup a perspective view (2.5d) using javascript and still have it work on iOS.
I was able to do it 2 ways with javascript that worked on the html engine but they don’t work when running on iOS:
//First I tried this:
var cam = this.getCamera();
cam.setEye(0, -0.2e-7, 1.0e-7);
//Then this:
var eye = new cc.kmVec3();
var center = new cc.kmVec3();
var up = new cc.kmVec3();
eye.fill(0, -0.2e-7, 1.192092896e-7);
center.fill(0, 0, 0);
up.fill(0, 1, 0);
var lookupMatrix = new cc.kmMat4();
cc.kmMat4LookAt(lookupMatrix, eye, center, up);
cc.kmGLMultMatrix(lookupMatrix);
But this.getCamera() doesn’t work on iOS and iOS doesn’t have any of the cc.km* stuff. It does have cc.Camera though. I was going to try something with .createPerspecective but it doesn’t look like the javascript cc.Camera class has that function. Can anyone shed some light on this for me?
Thanks!