Align Platformer Character to Ground

So after some Googling, I came up with this:


It doesn’t quite do what I want it to do, It does align the character to the ground sooorta, but it looks like this:

The sprite is getting rotated towards the background as well as aligned to the ground, I’ve tried to use most of the make rot from nodes, but none of them quite do what I want and I’m not sure if I’m using the combination rot nodes (ie make rot from XY) correctly, I’m just plugging the normal into both X and Y. Can anyone help?

You’ll need to edit the collision to the shape of your rectangle for it to truly align.

Could you possibly explain a little bit more? The thing that’s being rotated is just a sprite set to no collision, it isn’t affected by collision bounds I don’t think…

Well what is wrong with your current setup?

Did you see my pictures or read my post? It isn’t just aligning the character sprite with the ground, it’s also rotating it backwards. It’s supposed to be an upright rectangle

So it is aligning how you want, but it should be standing up and not on it’s side?

Yes, but that alignment is happening because of my blueprint. It isn’t a matter of just repositioning it in the editor or something.

Is the line trace starting at your cube and not vice versa?

It starts at my collision capsule and extends down from there

Do you know how many degrees too much it is being rotated?

No, and I don’t know how to find out either.

Hmmm… Well, to be honest, I’ve never even used a rotation node in my life, but if I’m correct, rotation starts at 0 at the top, and goes to 360 like a clock. If that’s the case, then technically it is doing exactly what it should be, because in that case, the floor is “rotated” ~100 degrees, and the same rotation is being applied to your rectangle. Try subtracting 90 from the rectangles rotation.

Hmm alright i’ll give it a shot. Thanks

Alright so I got it working, but I have anew question that’s related: Once I have this angle from the normal, is there a way to launch the character or apply force to it along that same angle?
Like this:
Q4zHHB6.png

Try adding angular impulse.

That should work, thanks!