1 decade ago by JamieRushworth
Hi there, I am currently trying to make a simple top down view game that features two different types of entity. I'm trying to make a mirror that doesn't react to physics aside from allowing the laser to bounce off of it and me being able to rotate it directly as though using this.currentAnim.angle. The other entity being the laser which needs to bounce off the mirror with no loss in velocity. This is a screenshot of it at the moment http://imgur.com/UzXntHP
Having never used Box2d and there not being a lot of documentation with it in Impact, I'm finding myself a bit lost. I can spawn and get the laser to fire at the mirror and I can get the mirror to rotate, despite the fact it acts with mass meaning letting go of the arrow key allows it to continue rotating, but then the laser hits the mirror and they both act as though they are in space.
So I basically need to know how to rotate the mirror without ApplyTorque, how to make the mirror stay in place when it is hit and how to make the laser bounce off the mirror with no loss in velocity.
I should point out that I am using Joncom's very awesome Box2d plugin https://github.com/Joncom/impact-box2d-sugar
Any help will be very appreciated, thanks!
Having never used Box2d and there not being a lot of documentation with it in Impact, I'm finding myself a bit lost. I can spawn and get the laser to fire at the mirror and I can get the mirror to rotate, despite the fact it acts with mass meaning letting go of the arrow key allows it to continue rotating, but then the laser hits the mirror and they both act as though they are in space.
So I basically need to know how to rotate the mirror without ApplyTorque, how to make the mirror stay in place when it is hit and how to make the laser bounce off the mirror with no loss in velocity.
I should point out that I am using Joncom's very awesome Box2d plugin https://github.com/Joncom/impact-box2d-sugar
Any help will be very appreciated, thanks!