So, I'm working on a 3d side scroller, wherin the character shoots at things on screen. I'm using this tutorial for the base setup. However, I'm modifying it so that instead of aiming at mouse positions, it instead aims at the location of a raycast impact, instead of the mouse position. To do this i've made an invisible plane that only the raycasts can hit, with them originating from the camera position.
I've got it figured out so far that it works perfectly to the right of the character, however, when the impacts are to the left of the character, they aim at the opposite direction, as though the impact were mirrored on the opposite side. Using printstrings I've figured out that the rotation of the sphere at 9:00 and 3:00 is 0 degrees, 45 degrees at 10:30 and 1:30, and 90 degrees at 12:00. Then at 4:30 and 7:30 its -45 degrees, and 6:00 its -90.
How can I get it to work on both sides? Is there a way I can rotate that 0 point vertically?
Here's the blueprint
I've got it figured out so far that it works perfectly to the right of the character, however, when the impacts are to the left of the character, they aim at the opposite direction, as though the impact were mirrored on the opposite side. Using printstrings I've figured out that the rotation of the sphere at 9:00 and 3:00 is 0 degrees, 45 degrees at 10:30 and 1:30, and 90 degrees at 12:00. Then at 4:30 and 7:30 its -45 degrees, and 6:00 its -90.
How can I get it to work on both sides? Is there a way I can rotate that 0 point vertically?
Here's the blueprint
Comment