Getting the Forward Vector of a Parent Actor
I'm currently attempted to create a laser beam that will shoot out of this boss that I have, following with it's rotation but currently I can't seem to get it to follow the rotation.
The Boss will always look at the player as shown in the Image above, with the red lines being where the laser is meant to be following but as you see, they're not actually working with the bosses rotation, they should be pointing directly at the player while coming from the middle of the iris of the eyeball.
This is my code for creating the raycast that I'm using:
The reason I'm doing "GetParentActor()->GetActorForwardVector();" for the Forward Vector variable is cause the laser beam is currently a component of the boss so I want it to get the bosses forward vector instead of it's own (Though I imagine it would work either way as it should rotate with the boss). However as you see, this doesn't work and I'm not really sure how to get it working.
Can anyone help? I'd very much appreciate it
asked May 22 '18 at 12:30 AM in C++ Programming
add a UArrowComponent to the boss and attach it to his head along his sight.
then get arrow forward vector whenever you need boss forward vector.
answered May 22 '18 at 09:37 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here