9 years ago by AndrewMast
I need help with drawing my entities that the players' feet are under and yet the arms are over it.
Example:
Example:
9 years ago by AndrewMast
Please? Anybody? I really need this for my game!
-Andrew
-Andrew
9 years ago by Joncom
Possible to see the same screenshots but with show-debug-collision-boxes enabled? My thought is that if your player collision box is small (covering roughly only the size of his feet) then you shouldn't be having this issue...
9 years ago by AndrewMast
Here are the other images:
9 years ago by Joncom
Sounds like you want the player to be drawn under the table, BUT you want his upper half to be drawn above the table.
So maybe always draw the player under the table.
But then in your game
So this would mean finding the
http://impactjs.com/documentation/class-reference/image#draw
So maybe always draw the player under the table.
But then in your game
update
function, draw the player a second time, but only draw the upper half.update: function() { this.parent(); /* now draw the upper half of the player again */ }
So this would mean finding the
ig.Image
instance in player.currentAnim
, and then drawing whatever specific chunk is relevant.http://impactjs.com/documentation/class-reference/image#draw
9 years ago by AndrewMast
Thanks! I will try something like that. I have other entities that I don't want the upper half to be on top of, so I will need to change something.
I have a lot of layers for the player. What's the best way to only get the top half of the player?
-Andrew
I have a lot of layers for the player. What's the best way to only get the top half of the player?
-Andrew
9 years ago by AndrewMast
What would the best way to draw my entity to an external canvas and then draw it back in the game?
-Andrew
-Andrew
Page 1 of 1
« first
« previous
next ›
last »