This site requires JavaScript, please enable it in your browser!
Greenfoot back
cq1um
cq1um wrote ...

2021/2/3

hitboxes are very inaccurate to the real hitbox of the bullet

cq1um cq1um

2021/2/3

#
the image of the bullet is transparent, yes i have tested the hitboxes https://www.greenfoot.org/scenarios/9908 < here, and the hitbox seems fine to me on the car (that is being shot at) aswell as the bullet.
RcCookie RcCookie

2021/2/3

#
I dont really understand you problem. But the scenario you are pointing at seems to be broken. Its quite old. Generally though greenfoot measures collisions al if the actor was as big as the image, no matter if some part is transparent or not. So try using images that don't have big transparent corners or outlines. Otherwise you will have to code your own collision measurement system, for example by using multiple actors to create a more detailed hitbox
danpost danpost

2021/2/3

#
cq1um wrote...
the image of the bullet is transparent, yes i have tested the hitboxes https://www.greenfoot.org/scenarios/9908 < here, and the hitbox seems fine to me on the car (that is being shot at) aswell as the bullet.
Do not link someone else's scenario for a problem in one of yours. Provide your code (Bullet and Car classes).
You need to login to post a reply.