Issue #18 new

Separate Collision Box from Draw Area

created an issue

Proposal: The area that a sprite checks for collision should be separate from the area that it draws to, perhaps by using an offset set of coordinates or another rectangle.

Use Case: I want to be able to draw a character that is tall, but doesn't have his head collide with things. I'm doing a game from a top-down perspective (think FF6 or Chrono Trigger) and my character needs to appear partially in front of colliding walls at times. As such I've needed to hack together a sprite that contains a group and calls the group's update and draw methods, while using the sprite's collision info.

Suggestion: A simple solution would be to provide an offset x and y, from which coordinates the sprite would be drawn. These would be treated as relative to the sprite x and y. This is the method Flixel uses and it is both straightforward for the user and flexible.

Comments (2)

  1. Log in to comment