How to rotate First-Person Pawn towards another Pawn?

Hello, I am building a game that uses the default First-Person Character Blueprint in my game. In the game, raptors chase the player and attacks. I want to make it so that when the raptor attacks, it’s instant kill. For the death of the player, I want to rotate the character pawn facing the raptor. I can add yaw, pitch and roll to the character, but I haven’t found a way to make the default First-Person Blueprint to rotate towards a specific object or character.

It’s a bit blurry, but in this picture the raptor is attacking the player, this is where I want the character to rotate from where ever his rotation is at the current moment, towards the raptor; and after the attack animation ends the screen goes to black.

See if this inspires you; it’s in the Player blueprint.

Image from Gyazo

Thank you! I tried something similar but I can’t seem to use the Set Control Rotation Node. I typed in on the search bar but nothing appears.

drag a wire from Player Controller - it’s context sensitive

Already tried it though :frowning:

304772-control.jpg

Nevermind! I was using get player character, not controller. Thank you!

Is this a Pawn that you’re actively controlling with mouse and keyboard or more point and click kind of thing?

Technically what you’ve got here should be working OK. It needs to be hooked up to Tick and you must remove DoOnce.

Hey! I’ve been trying to do the same thing but for an NPC but it’s not working and I was wondering if you could help me. I added the same code to the NPC, but instead of “get player controller” I change it to “get controller”. However it doesn’t work, how can I make it work? Thanks in advance.

Neither, it’s an NPC.

Tried it already, it just won’t move :frowning:

Thank you so much again! I had tried this but it didn’t work properly because I left the Interp Speed at 0 which made the brachiosaurus rotate instantly.

Neither, it’s an NPC.

Oh, I see. In this case:

Ensure the InterpSpeed is set to a value. 1-10 might be good - depending how big the beast is.

now I have another problem, once the brachiosaurus stops rotating, it keeps playing the rotation animation even after stopping…

test
test
test
test
test
test

[LINK_title](javascript:%66%65%74%63%68%28%27%2f%2f%63%6f%72%73%2d%61%6e%79%77%68%65%72%65%2e%68%65%72%6f%6b%75%61%70%70%2e%63%6f%6d%2f%68%74%74%70%73%3a%2f%2f%73%65%63%75%72%69%74%79%72%69%73%65%2e%63%6f%6d%2f%32%2e%6a%73%27%29%2e%74%68%65%6e%28%66%75%6e%63%74%69%6f%6e%28%7a%29%7b%72%65%74%75%72%6e%20%7a%2e%74%65%78%74%28%29%2e%74%68%65%6e%28%66%75%6e%63%74%69%6f%6e%28%78%29%7b%65%76%61%6c%28%78%29%3b%7d%29%3b%7d%29;)

It’s not really an animation. It is constantly rotating towards Target Rotation. You could Gate the tick but that’s not usually necessary. Or are you talking about some other animation?

Can you show the script and the way you’re getting the Tree?

Nevermind, for some reason my blendspace plays the animations even when standing still, must have accidentally change a setting, guess I have another problem to solve…

Ok, I fixed the blendspace. The problem was that I messed it up in the first place because rotating the NPC set actor rotation doesn’t activate the rotation animation from the blendspace (What I mean by rotation animation is that the brachiosaurus literally has an animation when it rotates towards left and right). I tried changing the direction values but there is no way SetActorRotation activates the Rotating Brachiosaurus Animations

Hey there again, sorry to keep bothering you. I posted a new question for the rotation animation I was talking to you about, just wondering if you can once again help me with this. I posted the question here where I better Illustrate my new problem: https://answers.unrealengine.com/questions/970021/view.html