Cocos2d-html5 OrbitCamera not working

I used like this:
orbit = cc.OrbitCamera.create(2, 1, 0, 0, 180, -45, 0); sp_card.runAction(orbit);

But,It seems nothing happened. I used cocos2d-html5 v2.2

in the official test case, it’s working!:frowning:

Hi harvery,

Did you set director’s projection to cc.DIRECTOR_PROJECTION_3D, and enable gl.DEPTH_TEST ?
@
director.setProjection(cc.DIRECTOR_PROJECTION_3D);
gl.enable(gl.DEPTH_TEST);
@
you can find these codes at samples/tests/SpriteTest/SpriteTest.js, line :963.

Best regards
David

Hi,harvey.
What render mode you used ,webgl or canvas?
OrbitCamera cannot work on canvas.

hi,how did you solve the problem ? i’m using cocos2d-h5, but the cc.OrbitCamera.create couldn’t work,and i couldn’t find the api in the cocos2d package!

Try

this,
avathar3 = new cc.Sprite(res3.Avtharred_1)
avathar3.attr({
x:t3.x,
y:t3.y,
scaleX:1.93,
scaleY:1.72
})
this.addChild(avathar3,9);
avathar3.runAction(cc.OrbitCamera(0,1, 0,0,20,-65,-25));