x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Paper2D collision problem with rotated objects

Hi,

I have a problem with collision between 2D Scroller Character and rotated sprites in Paper2D. Collision works fine when objects are not rotated. When I rotate the sprites there is some 'thickness' above the sprite and my main character walks little above the sprite. I attached images to explain it visually (second image is from show collision command written in console). The same problem appears in Paper2D Tilemaps too.

alt text

alt text

Product Version: UE 4.10
Tags:
more ▼

asked Dec 17 '15 at 08:45 PM in Bug Reports

avatar image

zygmuntix
13 2 3 6

avatar image AndrewHurley Dec 18 '15 at 05:13 PM

Hello zygmuntix,

You don't want to use a square collision since you will encounter these issues. The capsule character collision is in place for reasons just like this. If you take a look at the Paper2D Side Scroller example, you can see we actually use a 3D Capsule to define the characters collision, which works well for almost all cases.

Paper 2D Collision Capsule

alt text

Wireframe 2D Collision

alt text

Let me know if you have questions.

Cheers,

Andrew Hurley

avatar image zygmuntix Dec 18 '15 at 07:46 PM

My 2D Character was created from Paper2D Side Scroller character. I just changed some forces for jumping and other things, but I didn't change collision. My 2D Character uses 3D physics - it uses capsule collider 3D. My other sprites use 3D Physics. For me this issue isn't yet resolved.

avatar image AndrewHurley Dec 18 '15 at 08:00 PM

Try changing the 'Walkable Floor Angle' to a higher number so you are able to move up a steeper incline.

This is found in the area where you changed the other character movements options.

Character Movement : Walking

alt text

Cheers,

Andrew Hurley

maxwalkangle.png (264.6 kB)
avatar image zygmuntix Dec 18 '15 at 08:07 PM

This doesn't work. It was set to 45. I set it to maximum 90 value and nothing changed.

avatar image AndrewHurley Dec 18 '15 at 08:31 PM

Could you provide me with screenshots of your Characters blueprint?

Can you reproduce this is a blank project, or is this only occurring in your project?

If you cannot reproduce this in a new Paper 2D Project, then I would do some comparisons between the default Paper 2D Character Movement and your own characters blueprint, to see where they differ and which settings may be preventing you from navigating up this ledge.

avatar image zygmuntix Dec 19 '15 at 08:22 PM

I managed to reproduce the problem in a new 2D scrolling example project. Thank you for your interest in this issue. You are very helpful :) Please download the project I linked: 2D Scrolling example project

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

So I found the setting you were looking for, and I must have misunderstood the issue. I thought you were having troubles climbing the slope, and not the visible collision.

All you need to do is open your characters blueprint and uncheck the option 'Use Flat Base for Floor Checks'. This will allow the character to stand closer to the platform. This option is found within the Character Movement component within the dropdown for Walking.

Use Flat Base for Floor Checks

alt text

alt text

Let me know if you have further questions.

Thanks,

Andrew Hurley

idlestand.png (153.4 kB)
more ▼

answered Dec 20 '15 at 11:16 PM

avatar image zygmuntix Dec 21 '15 at 03:15 PM

Ok, thanks. I will check it when I go home. I would also like the character to go along the wall like shown in the screen (sorry but my GIMP skills aren't good). Should I make another topic for this on UE4 AnswerHub or this place is also good?

alt text

correctposition.png (138.0 kB)
avatar image zygmuntix Dec 21 '15 at 03:26 PM

I think now that I can do this by just setting the rotation of player to the rotation of the wall. Please tell me if I am wrong.

avatar image zygmuntix Dec 21 '15 at 11:07 PM

Ok, thank you very much, problem is solved. Unchecking the option "Use Flat Base for Floor Checks" worked!! :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question