Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Patrick

I am writing some like a pinball machine.

The problem is, for the paddle entity (basically a rectangle), I change the currentAnim.angle to a negative value and set the currentAnim.pivot at one end instead of center, to swing the paddle. After that, I realized that the paddle does not hit the balls (collision not detected) while it swings.

I cannot find any function of Entity to make the Entity reposition itself in an angular way such that collision detection will work.

Can anybody help me ?

Thanks in advance.

1 decade ago by mimik

sounds like your collision box isn't rotation along?
if you activate impacts debug plugin and view your entities collision outline maybe that will tell you whats going on.

10 years ago by wrondon

Sorry to revive this old post.

Is it possible to rotate a collision box? I was just able to rotate the animation, with this code:

this.currentAnim.angle += Math.PI/9 * ig.system.tick;

Thanks,
Wagner

10 years ago by Joncom

Quote from wrondon
Is it possible to rotate a collision box?
No. Not with Impact out of the box. You'd need to use something like Box2D.

10 years ago by wrondon

Thanks Joncom.
Page 1 of 1
« first « previous next › last »