I’m trying to achieve behavior where line trace start position would be altered from the player pawn position by rotating it around the target sphere actors origin maintaining the distance between the two (look at the attached images). Amount of rotation is read from mouse X&Y movement and X value (Range: -1.0 to 1.0) would rotate the vector position left/right in relative to the sphere origin (red axis on the attached images), Y value down/up (green axis on the attached images). Both the player and the target sphere are a actors which are constantly moving and changing their transforms so this BP should take that into consideration. If it helps, I’m trying to mimic a kick of a football and the impact on the ball surface should be determined by means described above.
I did manage to get kicking straight ahead working (the one where yellow arrow is pointing directly at the crossing the two axis) but I’m stuck with the rotations. Also I’m open to other suggestions how to do this but I figured offsetting the start position before tracing would be the easiest way since I could get impact point and normal on the sphere straight from the trace result.
I have a feeling this might be a no brainer but I’ve been at it for 2 days and just can’t figure it out.
Thanks in advance.