Timeline Rotate XY Based on Hit Direction

I’ve done some searching around but can’t seem to find an answer to this (could just be specific terms I’m missing…)
In a turn-based hex grid game, I have a BP actor that can be “attacked” from one of 6 sides (hex grid) and I want to get it to rotate away on XY with the energy from the hit then rotate back (think like a punching bag). Ideally not using a physics sim with springs and all that.
Scratching my head a bit to be honest… I’m grabbing the character location and actor location but am fumbling around trying to figure out how to translate these two points of data into an appropriate axis… one of the additional things is the asset will spawn in at a random rotation, so I can’t assume the Z rotation being 0.

Any help much appreciated!

PS. didn’t mean to have the FeatureRequest tag on there, but it seems like I can’t remove it now

A little bit of a fiddle, but you need to rotate the hex piece on a axis which is at right angles to the normal of the impact face.

I think you can get the normal from the line trace, and then maybe do something with rotate around axis…

1 Like

Beautiful! That was enough to set me on the right path :slight_smile: Thanks a ton (PS. your game looks awesome)

1 Like

Wow, it is nice to see something like this solved so quickly. He just beat me to it!

1 Like