Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Szuran

A question about hitboxes

Question

How does character hitbox work? Let's say I have a spire 60px wide but the character is 40 px across and the rest is a transparent area. Does this transparency counts as a hitbox area or are only visible pixels hitable?

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 1

It's determined by the Height and Radius properties in the actor. I suggest trimming the sprites so there are no transparent areas, then defining the Radius as ever so slightly smaller than the sprite itself, to allow it to fit in more areas. Radius is calculated from the middle outwards.

 

So for a monster that is 64 pixels wide at it's longest frame, use a Radius of 30 and not 32. That gives it 4 pixels of extra space to work with and the effect is not noticeable in game.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×