Hello,
This is my first day developing in Unreal 4, and I’m going to come right out and say it - I’m an artist trying to do some blueprint gameplay!
I’ve fumbled through to almost achieving what I set out to do, but have a small bug I would love to iron out in the way my character is moving for a 2D side-scroller. Hopefully this thread will help others too!
Basically I want my little character to move to the right (-Y direction) automatically without any input, then if he hits a wall he’ll turn around and walk back (+Y) until hitting a wall and being reversed again. So no controller inputs, a bit like lemmings might move!
It works apart from when falling, which seems to return higher values than hitting a wall (and always turns him). So he walks off a ledge and then returns in the direction he came from, rather than continuing forward, which is what I want to fix!
Here are the nodes I laid out, mostly through trial and error, so I’m sure someone can pick this apart and teach me a better way:
My best guess is that the Dot product node is doing something I don’t want it to - I basically was trying to clamp out the X and Z channels of the Hit Normal Vector (to hopefully leave Y direction from -1.0 to 1.0), but couldn’t find a node to mask them.
Any help is much appreciated, once this is cracked I can get back to making things pretty which I’m much more competent at!
Thanks,
J