Description

Sprite collisions do not accurately reflect the collision for the sprite. While the collisions are always the same between two of these, the collisions do not correspond to the shape of the collision geometry.

I have attached a simple .png which I imported, created a sprite from, and added shrink-wrapped collision. Note that using the example .png and adding up/down movement controls in addition to the right/left listed in the repro steps will let you circle the other pawn and see where the collision geometry allows overlap and where it does not.

Steps to Reproduce

1. Launch: UE4Editor.exe
2. Create a new 2D Side Scroller Blueprint project
3. Create a new empty level
4. Create a sprite from a circle texture (see attached)
5. Edit Collision
6. Change the Collision Geometry Type to Shrink Wrapped
7. Make a new Pawn Blueprint
8. Add a Sprite component, Spring Arm component, and Camera component
9. Set the Camera to Orthographic
10. Adjust the angle of the Spring Arm on the Z axis to 90
11. Add the circle sprite to the Sprite component
12. Add an Event Tick node
13. Attach an Add Actor Local Offset node
14. Multiply a MoveRight function by 1
15. Attach to a Make Vector node
16. Attach to the Delta Location
17. Enable Sweep
18. Drop a Player Start into the level at Y = 0
19. Drop the Pawn BP into the level to the right of the Player Start
20. Set the Pawn BP as the Default Pawn Class in the Game Mode
21. PIE
22. Console > Show Collision
23. Move the player pawn to the right

Result:
The player pawn will be blocked by the other pawn only after it has moved a certain amount inside the other pawn's collision geometry

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Gameplay - Paper2D
Affects Versions4.5.14.6
Target Fix4.8
Fix Commit2458842
CreatedOct 31, 2014
ResolvedMar 10, 2015
UpdatedApr 27, 2018
View Jira Issue