Home Unreal Engine

Paper 2D Character - CapsuleComponent gives incorrect Collision

polycounter lvl 9
Offline / Send Message
EliasWick polycounter lvl 9
Hi, I am currently making a 2D platformer game using Paper 2D. I am having problems with the CapsuleComponent, it's not giving me correct collision, my sprite doesn't want to touch the ground. In the following image you can see the CapsuleComponent and the Sprite(Red Square). The weird thing is that the collision works fine on the X axis (Left to right), but the cube sprite just doesn't want to touch the ground:


I have two questions regarding this topic.
1. Can I add a box collision since the character is going to be the red box?
2. If I can't add a box collision, why the heck is the CapsuleComponent acting up?

Thank you!

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    "Character" class comes with the built in capsule for physics based movement simulation, you cannot change that in blueprints. You could have a custom pawn with custom collision though, made in cpp. Or you can have an actor not based on char or pawn and do your own collision and simulation.
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    Obscura said:
    "Character" class comes with the built in capsule for physics based movement simulation, you cannot change that in blueprints. You could have a custom pawn with custom collision though, made in cpp. Or you can have an actor not based on char or pawn and do your own collision and simulation.
    Yeah, I'm looking into that... It's just weird that it's not colliding with the floor of the level. Creating my own Pawn with my own custom player controller is way out of my league. I've started to look for a video on that subject, but it's hard to find something for my project.
    Here is another image of the problem:
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Can you please show me a video example of the char starting to get floating? Or does it happen immediately right after starting?
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    Obscura said:
    Can you please show me a video example of the char starting to get floating? Or does it happen immediately right after starting?
    I "solved" the problem by offsetting the sprite by 1-2 units and making it larger (The original sprite size 16 Units, and I made it into 64 units), so that it looks like it's touching the ground, I also moved the camera further away. I can upload a video if you'd like, but I have followed the Paper 2D tutorials by Epic and it should work for me.

    To answer your question: The sprite immediately starts about two units above the ground.

    Also, at a closer inspection at the Unreal Engine 4 2D Platformer Template, the character is floating about 2 units above the air. The camera is further away which hides that. With my 2 days heavily experimenting with Paper 2D, my conclusion is that if you are making a pixel game, something down to 8 or 16 pixels per tile, you should make your own engine or use something else than unreal. It works but the support and functions to easily work with Paper2D is a bit outdated. I don't hate it... It's just not perfect.


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I haven't checked out the tutorial by Epic, but I tried out paper 2d and i don't remember seeing offset between player capsule and collisions. So I don't think that this is normal. I'm gonna check it out when I get home.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Alright, I checked out the template and he is indeed floating by default  :/
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I see this happens with 3d char as well you just don't notice it normally.
  • EliasWick
    Options
    Offline / Send Message
    EliasWick polycounter lvl 9
    Obscura said:
    I see this happens with 3d char as well you just don't notice it normally.
    Cool, thanks for confirming this! I'll be looking for a solution in the future or some kind of workaround. Some people suggest creating your own pawn instead of using the character system, which will enable you to create a custom collision for the character, which might solve the problem.
Sign In or Register to comment.