Hitbox not updated after rotation

138 views
Skip to first unread message

KAB KA

unread,
Feb 1, 2014, 5:00:16 PM2/1/14
to haxef...@googlegroups.com
Hi,

I'm creating a "rotating platform" class. I use FlxTween to manage rotation and it's work pretty well.
But the platform's hitbox is not updated and it stay a flat-static-rectangle. I've tried updatehitbox(), setGraphicDimensions(), FlxSpriteUtil.updateSpriteGraphic()... nothing is working..

Any idea ?

Gama11

unread,
Feb 1, 2014, 5:01:50 PM2/1/14
to haxef...@googlegroups.com
There's no way to do this. updateHitBox() only works with scale. updateSpriteGraphic() has nothing to do with it.

You can try pixel perfect collisions however (FlxG.pixelPerfectOverlap()).

KAB KA

unread,
Feb 1, 2014, 5:50:24 PM2/1/14
to haxef...@googlegroups.com
I think i have to give up the idea... crap

Thanks anyway

Gama11

unread,
Feb 1, 2014, 5:55:19 PM2/1/14
to haxef...@googlegroups.com
You could look into flixel's nape integration... nape has a really robust collision system.
Reply all
Reply to author
Forward
0 new messages