Jump to content
  • 0

Collision for different type of sprites (animals)


Dagobah

Question

i have an animal sprite that is close to two tiles of width but the collision is only one tile and is in a different position of the sprite so i was wondering if is anyway way to edit the collision of the entities.

 

 

Thank you


 c4f7b58f0b003d532e7e90d53271a64b.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

You could make it so the player sprite appears over the NPC's, so that it appears in front.

You could also change the tile sizes so that a tile is actually double the height it usually is.

Link to comment
Share on other sites

  • 0

thank you for your answer but i dont have a problem with the sprite layers that's fine just the collision is under the sprite and changing the tiles size would make all the others collisions bigger which i dont need because they look fine

 

i left a video to be more explicative

 

 

Link to comment
Share on other sites

  • 0

i think your best and easiest bet is to draw them lower, which requires changing the destRectangle.Y in client/entity/Draw.

 

otherwise you would probably need to heavily edit the source to make the sprite size larger than one tile

Link to comment
Share on other sites

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
×
×
  • Create New...