tank-dev / tank

A 2D C++ game engine taking inspiration from FlashPunk
Boost Software License 1.0
12 stars 3 forks source link

Origin of entity #45

Closed Anstow closed 11 years ago

Anstow commented 11 years ago

The origin of an entity's hit box is the same as the origin of the entity. This makes it awkward to do anything.

Anstow commented 11 years ago

Actually perhaps it isn't. I'll look into it a little more.

Anstow commented 11 years ago

Actually this is a thing.

Anstow commented 11 years ago

I think this is expected behaviour. What I was seeing was another bug in that the hitboxes ignored the position relative to the position of the entity.

qualiaa commented 11 years ago

Hmm, that shouldn't be. I added relative collision about three weeks ago. I'll have a look, but it seems to work fine in Stranded. Maybe it's only in the SFML branch - I'll be merging that in now anyway.

qualiaa commented 11 years ago

Ah, you meant in isIn. @DavidTruby hammered that in just before the competition, and it's probably not permanent (in that form at least)

DavidTruby commented 11 years ago

I hammered it in during the competition actually ;-). And yeah, I think I did it from the origin and not the top-left corner. Mybad ;-)

qualiaa commented 11 years ago

Nah, the problem was that you weren't adding the Entity's position to the hitbox coordinates? @Anstow fixed it in the Compo branch, I think.