Unreal 4.20.0 How do I check for collision with wall left and right, for wall jump? (2d platformer)
Hi :)
I am using Blueprint and I would like to check from my player object to the left wall and the right wall of the level in order to wall jump.
Here is a screenshot of what the level looks like. I used a Tile Map to make the level.
![image](http://makegamessa.com/uploads/FileUpload/3a/60cb625429a265215fc9b78e710fd5.png)
Any help is appreciated :)
I am using Blueprint and I would like to check from my player object to the left wall and the right wall of the level in order to wall jump.
Here is a screenshot of what the level looks like. I used a Tile Map to make the level.
![image](http://makegamessa.com/uploads/FileUpload/3a/60cb625429a265215fc9b78e710fd5.png)
Any help is appreciated :)
![](https://makegamessa.com/uploads/thumbnails/FileUpload/3a/60cb625429a265215fc9b78e710fd5.png)
![](https://makegamessa.com/uploads/thumbnails/FileUpload/3a/60cb625429a265215fc9b78e710fd5.png)
Screen_shot_01.png
1679 x 1011 - 207K
Comments
The things you're tracing against would need some kind of collision component on them (probably a box collision this case).
I managed to use LineTraceForObjects and it worked :D
Here is an screenshot of what I wanted to achieve:
A line is drawn from the player to the left and when it hits the wall it registers a collision, changing colour.
Currently I want to see what I can do 2D wise in UE, GameMaker's gml is something I don't know well enough to express myself fully. I also like the idea of visual scripting that UE's Blueprint offers.
Here is an article on 'The Siege and the Sandfox' I found interesting:
https://80.lv/articles/the-siege-and-the-sandfox-pixel-art-game-with-ue4/
I have been using a TileMap in UE for my level. The LineTrace I did checked where the player collided with it ito a horizontal line. The problem was it registered the whole map instead of only the walls. Then I put a new sprite in the level, declared it to BlockAll (then being a WorldStaticObject) collision-wise.
I couldn't figure out how to wall-jump when the player and the traced object collided themselves so I got to the implementation in the image.
Now, the player, depending on its velocity when jumping against the wall object bounces away with an 'up' and horizontal' value added. Ito axis direction the bounce is in the opposite direction :)