I'm trying to make the bounds rectangle of my sprite smaller than the sprite itself in an attempt to make a customized "hit-box" for it. But everytime I shrink the bounds rectangle, and export my sprite, the changes I made to the bounds rectangle don't register. The only use for being able to resize the bounds rectangle seems to be to crop your image. Am I missing something here?
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Can you make the bounds rectangle smaller than the sprite without it cropping the sprite?
I think you're misunderstanding what that bounds rectangle does. It specifies a capture box to determine what bitmap data will be displayed for the sprite. If you've ever used SWFSheet you'll notice that you'll have to manually specify the bounds rectangle. With Spriteloq that's automatic and what we call automatic bounding.
If you need a customized hit box you need to use the shape box tool to draw a rectangle. Then you can use the API to get the shape to do collision detection: http://www.loqheart.com/spriteloq/apidocs/files/loq_sprite-lua.html#SpriteGroup.getShape
Thanks for clearing that up, Don. Yes, I was hoping for the bounds rectangle to be a separate tool (independent of it's cropping functionality) with the express purpose of creating customized "hit-boxes" for non-physics based collision detection (a la Street Fighter), but the shape box tool will have to serve this purpose. Now if I can just find a way to get rid of the physics effects that accompany the use of this tool! (I explain more in my other thread dealing with "hit-boxes" https://developer.anscamobile.com/forum/2011/08/27/how-do-you-make-sprites-hitbox-smaller-its-bounds-rectangle)
Much thanks,
Steven
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
Leaving a Database Open
Invalid Binary
Why do we call the product Corona?
Getting rid of the stutter between launch image and app start
[SOLVED] path drawing for 2 different objects
Timer Not Being Created Again After Pausing
GPS sample not working on android 1.6
Game preview
Gravity at one point