Augmented Reality

hello sir., is there a way we can achieve this in cocos2d-x???

More than likely. The description for the video says it uses the gyro and camera, so you only really need to get the video feed into your app and figure out how to interpret the gyro readings.

I’m not sure how the app tracks moving/rotating the device sideways, though, unless the accelerometer is that sensitive or the device has a compass or something.

if you can integreate OpenCV with Cocos2d-x, you will achieve it :slight_smile:

If you want to use unmodified Cocos v.3 then no; Cocos does not have “Core Motion” integration yet, nor does it have live camera behind the OpenGL layer. That said, Cocos is open source so you could modify it to add both these functionalities, but you would have to do much of that modification specific to the OSs you want to support.

thanks you sir for your reply, but how can i achieve the movement of the butterfly as if there on the same position the last time you saw them. it seems they are everywhere on the screen. if i move to right, left, up and down, there are everywhere.


sir, i need help on how to achieve this. any comment/suggestions. or sample. thanks