AS3 - hitTestObject Collision Not Registering Correctly

前端 未结 2 1640
鱼传尺愫
鱼传尺愫 2020-12-22 03:41

I had a problem with my hitTestObject collision detection a couple of days ago which has since been fixed (How can I solve my hitTestObject Collision Null Object Ref Error)

2条回答
  •  孤城傲影
    2020-12-22 04:12

    I long abandoned the builtin flash functions for collision detection in favor of my own system that uses the separating axis theorem for AABBs, or using something like Box2D to handle the physics for me.

    I've never had success with either hitTestPoint or hitTestObject, but you might find that the bitmapData.hitTest will work for you (never used it), or you could go with a rectangle-based grid system for everything, which is what I do.

提交回复
热议问题