Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Perspective & Physics Bodies
Started by jhow Sep 16 2016 12:09 PM

2 replies to this topic
physics perspective viewport

Best Answer Caleb P , 16 September 2016 - 01:55 PM

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

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

jhow

[GLOBAL: userInfoPane.html]
jhow
  • Contributor

  • 159 posts
  • Enterprise

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!



[TOPIC: post.html]
#2

Caleb P

[GLOBAL: userInfoPane.html]
Caleb P
  • Corona Geek

  • 1,424 posts
  • Corona SDK

  Best Answer

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



[TOPIC: post.html]
#3

jhow

[GLOBAL: userInfoPane.html]
jhow
  • Contributor

  • 159 posts
  • Enterprise

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.




[topic_controls]
[/topic_controls]