How do i change the hit box on a image for collision?

this is a short vid of what i want… 

 

https://youtu.be/u58bWw5pqik

 

please respond… this is getting to me lol i cant figure out a solution… and my and this is the image im using

 

You can’t change the size of the physics object, after the physics object has been created. You can, alternately, create a separately sized physics object that is distinct from your image, but is “bound” to your image through your gameloop. This way, you can have your image remain un-altered, and have the physics object be any size you like.

I’ve removed your duplicate thread.  Please only ask each question once.  If you don’t get an answer you can reply to your own post to “bump” it back to the top.  Please wait at least 24 hours before bumping your thread however.

Thanks

Rob

Ok thanks Rob, I was in a real hurry didn’t get to delete the other post… But hey Alex, can you help me out with some of the code i need? i t would be very much appreciated. thanks

                                                                                  

                                                                  -Ruvim

UPDATE: Ok so i found out why my hit box is bad… check out this video…

http://youtu.be/9QXGKBvI5L0

sorry if you dont like me doing the videos its just its so much faster then explaining/typing everything out lol and thanks!

Videos can be helpful, but trying to read code and in particular trying to read what you’re writing and erasing is quite hard.

Any way your problem is that widget’s are not display objects.  I don’t know that you should be trying to turn them into physics objects.  They are not designed to be things you feed to physics.  Your button only is using one image, so I would recommend using a display.newImageRect() as I suggested in another thread. 

Rob

You can’t change the size of the physics object, after the physics object has been created. You can, alternately, create a separately sized physics object that is distinct from your image, but is “bound” to your image through your gameloop. This way, you can have your image remain un-altered, and have the physics object be any size you like.

I’ve removed your duplicate thread.  Please only ask each question once.  If you don’t get an answer you can reply to your own post to “bump” it back to the top.  Please wait at least 24 hours before bumping your thread however.

Thanks

Rob

Ok thanks Rob, I was in a real hurry didn’t get to delete the other post… But hey Alex, can you help me out with some of the code i need? i t would be very much appreciated. thanks

                                                                                  

                                                                  -Ruvim

UPDATE: Ok so i found out why my hit box is bad… check out this video…

http://youtu.be/9QXGKBvI5L0

sorry if you dont like me doing the videos its just its so much faster then explaining/typing everything out lol and thanks!

Videos can be helpful, but trying to read code and in particular trying to read what you’re writing and erasing is quite hard.

Any way your problem is that widget’s are not display objects.  I don’t know that you should be trying to turn them into physics objects.  They are not designed to be things you feed to physics.  Your button only is using one image, so I would recommend using a display.newImageRect() as I suggested in another thread. 

Rob