Perspective & Physics Bodies

Is the perspective virtual camera system compatible with Corona physics bodies? I’m having a hard time having my physics bodies (collision boxes) anchor to their associated objects. In other words, when I move my focused character, the collision boxes don’t stay with their associated display objects. I’m guessing that this is due to the fact that the library manually moves your objects, correct? Thank you!

Perspective is absolutely compatible with Corona’s physics. Just make sure that all of the bodies you want to use are inserted into layers of the camera with the  same  parallax levels.

  • Caleb

Thanks for the clarification. Eventually got it too work.

I guess hybrid mode of the physics engine just can’t deal with the shifting of layers. That’s alright, only using it for testing. It was just a bit confusing at first when my display objects weren’t locking with the physics bodies shown in hybrid mode. Anyways, I turned off hybrid mode.

Perspective is absolutely compatible with Corona’s physics. Just make sure that all of the bodies you want to use are inserted into layers of the camera with the  same  parallax levels.

  • Caleb

Thanks for the clarification. Eventually got it too work.

I guess hybrid mode of the physics engine just can’t deal with the shifting of layers. That’s alright, only using it for testing. It was just a bit confusing at first when my display objects weren’t locking with the physics bodies shown in hybrid mode. Anyways, I turned off hybrid mode.