mgalpy Posted August 10, 2016 Share Posted August 10, 2016 LATEST UPDATE Hi thanks for looking, but I have figured out my issue since posting this question. Here is a codepen with Box2d Phaser physics moving the bottom sprite with a sprite resting on top , and having the top sprite's physics respond - even after it has been inactive or at rest: http://codepen.io/mgalpy/pen/qNLVdA --------------------------------- New to Phaser JS and trying to build a "simple" game; If you imagine the game brick breaker - just the base and the ball. I want to be able to move the base up and have the ball still sitting on the base. I also want to be able to tilt the base and have the ball "roll" down depending on which side is tilted. Update 2 Here is a codepen of my Box2d Phaser attempt which comes closest to what I'm trying to achieve. If you use the arrow keys immediately to move the base up,down,left, right (while coliding with the box) then physics work as expected. If you wait a few seconds after the box rests on the base, moving the base has no effect on the box; I would like the box to be effected by the base even after the initial wait:http://codepen.io/mgalpy/pen/wWRBpo Update 1 Using Phaser's default Arcade Physics, I am now able to get the up movement of the base to keep the ball sitting on-top (although there are some brief overlap's that I'd like to keep from happening and not sure how to prevent that at the moment?); I was not able to allow the ball to "roll" down either side while tilting the base. It seems that even though the base is being rotated that the collision area is not being moved and the ball does not know that it needs to "roll" down. Here is an example phaser sanbox with debugging information (move left or right to see the base rotate): http://phaser.io/sandbox/WVVnswOt/play 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.