megasoft78 Posted October 4, 2018 Share Posted October 4, 2018 Hi guys, I'm creating a prototype with Panda 2 but I'm getting issues with physics. I setup a ground and a ball but when I use game.Circle as shape it doesn't detect the collision. It does work if I use both game.Circle or both game.Rectangle but it doesn't between game.Rectangle and game.Circle. Is it a know limitation of Panda 2? Any workaround? Quote Link to comment Share on other sites More sharing options...
Wolfsbane Posted October 4, 2018 Share Posted October 4, 2018 As far as I can tell, Circle to Rect collision doesn't work yet. It surprised me, too, but wasn't a big issue for what I was doing. Workaround would be p2.js plugin if you need really advanced physics. If you're making an older arcade style game, then simple rect collisions are fine most of the time even for circle type objects. Other workaround would be.. Panda is an open-source engine, so we could take a look at finding a fix, and improving the engine. Quote Link to comment Share on other sites More sharing options...
megasoft78 Posted October 4, 2018 Author Share Posted October 4, 2018 Ok, thank you. Quote Link to comment Share on other sites More sharing options...
enpu Posted October 4, 2018 Share Posted October 4, 2018 Currently in Panda's own physics engine collision is solved (bodies moved) only in Rectangle vs Rectangle and Circle vs Circle collisions. In Rectangle vs Circle the collision is detected, so your body's collide function is called, you could there manually move your bodies the way you want. Or then you could use p2.js physics. Quote Link to comment Share on other sites More sharing options...
megasoft78 Posted October 4, 2018 Author Share Posted October 4, 2018 Good, thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.