Jump to content

Any tip on how this can be done ?


askariwa
 Share

Recommended Posts

I have searched on web but i didn't found anything useful so i am trying here for a tip.

I want to make a game where i can handle a collision between a predefined game object (a sprite) and a dynamically shaped object, like the crate and the curve in the image attached to this post.

I want to be able to change the curve charateristics programatticaly and still get the colision events with the game sprites. 

I was thinking about trying to do the checking on an off-screen canvas but i didn't find any kind of tutorial on this in any kind of game engine. Could it be possible doing it with Phaser ?

 

Thanks in advance 

 

post-8585-0-42921700-1399731132.png

Link to comment
Share on other sites

as far as i understood he needs even more precise collision detection..  if he want's to dynamically change the shape a circle will not do it..  and what if the box comes from the other side of this curve?

 

i'd say this is a job for a polygon and can only be done with p2 physics   - but when the shape changes you would have to change the polygon body too.. thats **** hard to do!

 

 

another approach (given i understood right and you want the exact collision body for this "bow shape")  would be to make this shape out of several small sprites linked together with a constraint and then just change the positions of these (static) mini bodies -- and the collision shapes will change automatically with them..   

 

i'm thinking of something like this  - just without the physics determining the movement..  

 

http://test.xapient.net/phaser/ALL/chain.html

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...