Project: Paper2D

Will Paper2D be continues or updated ? I feel like it lays dead.

Make a pawn. Make a sprite. Add custom movement to it. should be able to achieve what you’re trying to do? I’m not sure I don’t have engine in front of me at moment. You can also attach a movement component via a c++ base class and hook everything else up to it.

If you have an epic games account you can check out work done to paper2d via their changes. active work is done to paper2d every month. If there’s a feature you’re looking for, put in a request. If Epic sees we want something bad enough they’ll give priority a change-eru.

Not sure if I’m not finding it or if it just doesn’t exist. I have a projectile impacting a TileMap and I’d like to know which Tile (XY) it impacted and change Tile. There are functions to edit tilemaps and with manual coords I can do it, but I’ve found no way to get tile at impact location.

Also, I noticed in main development Trello, on which we can vote, there is nothing about Paper2d, why?

thing is that I set mutliple collision boxes on sprite. But I cannot say that one box is “pawn” and others are “Overlap All”.
But I need something like that. So I’m contemplating source code and looking into it to modify it myself.

There was another trello for paper2d but that has come to a halt. who is creator of paper2d is also a very talented programmer and one of lead engine dudes so he’s being utilized for top level projects.

As for tilemap stuff: I’m not 100% sure. I think that might be something that can be built in easily if it’s not available but also a good request for tile maps considering it would def add to ease of life.

I’m interested in more details of what you’re trying to achieve. each individual sprite has a collision box of it’s own which can have it’s own property applied. You can also set a flipbook to play each collision on each sprite.


As you can see in my screenshot I set different collision boxes in each frame of an animation. I have for animation 4 boxes and only one that will keep my character on ground. But I can see only one collisions presets that apply to all my hitboxes.

I would like to be able to set a different collision preset for each box.
Why do I want to do that ? Because I am looking into making a 2D (sprite) fighting game. I am only at research phase but I want to know if I can do it with tools already in UE4 or if I should code some tools for engine.

I’ve invested 2 hours fiddling with blueprints trying to figure math out, but I’m always off somewhere. I might try again at some other point, luckily it’s not a high priority for me now- worst case I’ll go in with some C++ at some point.

Hmm. Not sure if is best way to go about it even from a custom standpoint. Having so many collision listeners ignoring each other while trying to listen to incoming damage and what not. You should just have one collision box for your character(blocking for walking and stuff) and spawn collision boxes(overlap for attacks, with traces, add sockets for spawning points for when you need it ex punching, kicking, etc.) and handle it via event calling “I punched, check for collision in my spawned collision.” which can be managed by a separate blueprint module if you don’t wanna touch code.

Shaping collision boxes on spawn will be your biggest feat but I think that’s easily overcome as well with a proper amount of data and socket placements. When you’re checking for high and lows that can be based off states (boolean variables) initially for prototyping, you can set world rules up for straight line traces later on if they’re a certain number above ground, within an interval of specific elevation numbers you’re hitting low, mid, high (if that’s how you wanna do it.) depending on size of your character though you’ll want to make that relative.

Another user on unreal forums is currently working on a paper2d fighting template and he’s much more knowledgeable on than me. His name is : @Achilleon

I’m just shooting darts into dark here, but he should be able to guide you into light :stuck_out_tongue:

I don’t have time I normally do or I’d investigate for ya and see if it’s something easily expose-able but if not then yeah math is always right way to go about it. Math Accuracy tip is: if you’re not getting exact data, add more variables until you do, once you are getting best amount of data you can get, simplify. :stuck_out_tongue:

https://twitter.com/alex_batista/status/789549576290234368

is something you’re looking to do? know which tile in X and Y you’re dealing with via a trace?

Yeah, pretty much. In my case it’s on XZ plane (sidescroller), but should be easy enough to flip.

https://.com/file/d/0B21FO5AAQbxDd3N2OTBqdUV1WHM/view?usp=sharing

alright try getting to work. it should be in folder MoreSprite or something. sorry for bad folder structure and stuff. I use project to test tech and create stuff. (I also use bad naming conventions but you’re looking at Tilemap blueprint probably called newblueprint and TileData datatructure. ) I do not recommend copy pasting, some things won’t carry over. you’ll just have to figure out how to translate it for yourself in X and Z. should be easy/straight forward.

I figured it out. Thanks Demoneyejin for offering help. I fought my way through it solo in end though.

I still have a problem and that is with precision.
If a Projectile flies like in image:
FlyBy.png
Then corresponding tile I get, is empty one above tile it impacted.
only way to do it I see is to do a raycast against last ticks position and see which tile is in way. Seems like a rather expensive check. Any better ideas?

way you think is right, but implementation is as you might guess, wrong.

You should develop 2D in Unreal with 3D in mind. For example, check Third Person Template. Mesh got one Capsule Commponent, but also has a Physics Asset. Capsule is what we moving and mesh itself is connected to it and Physics Asset takes care of what happens if a linetrace hits mesh etc.

So what you need to do is having a Box Component in your Character Blueprint (Or Capsule if you desire, I like Box) that you handle all movement and make box block ground, sidewalls etc, so that will fix your 1.Box problem.

About other Boxes, unfortunately it won’t work that way either. It is true that you can’t have separate collision responses. For that you would have to have 3 Flipbook components with each of them containing each boxes. As you understand, that’s literally a hell to prepare.

There are a few ways you can use to make a character use “Get Hit to Head” / “Get Hit to Stomach” / “Get Hit to Legs” animation. After hitbox connects (BoxTrace to be exact in Unreal 4 terms), you can get Impact Point, check if it is closer to legs, stomach or head.

My way of handling is easiest one. Enemy determines which animation Reciever should play. So I specify that attack is aimed at stomach, so whenever attack connects, it always makes Reciever play Stomach hit Animation.

In end it’s all about chosing your posion.

Good luck.

Alright I understand how I should manage low/overhead. I will set information in attack object but now question is following :
What about other collision boxes ? Lets say I have a box component for physique part then how do I manage boxes for attacks, boxes to say that char must block or hitboxes / hurtboxes ?


Since all of those boxes can be different each frame I cannot set them all with a 3D box.

You can’t use Box Component or Collision Component for hits. You -have to- use Boxtrace, or any other trace type that you desire. Reason is that Traces are easier to develop, can be dynamic, and gives information such as hit impact location etc.

Trust me, I tried it a few times, but it’s just too much hassle and using paper2d collision for hitboxes are pain to implement.

I understand why you would use box trace to detect a collision but how do you define collision zone that must be detected ? I know that if I would use 3D model box trace will tell me if I hit model itself and I would be able to see what “bone” was hit.
But in case of a flat box with an animated texture on it, how can I define that box trace hit extended hurtbox and can be considered as a counter-hit (for example) ?
Specially in world of fighting games where balance is everything and hitbox/hurtbox are not same size as actual fist or body.

I never felt need of needing to catch which collision box I touched. If I need to find out if my hit is a counter hit or not, I use my own “State Type”. For example my idle state is an “Non-Attack” while a Light Punch is “Attack” type of state. So if player one is doing a light punch and player two doing medium punch, and if player two hits player one first, then his attack counts as a counter hit.

Maybe I am thinking too simple but who knows.