I’m just starting with blueprint and can’t find the right way to make an object look at the player.
This could be so easy, but with blueprint very simple functions sometimes need 5 nodes or more…
I have a textrender in a class blueprint and I want it to look at target.
Could please someone tell me the solution?
Byte1
(Byte1)
February 10, 2015, 3:32am
2
You’re wanting Text to look at player?
Have you see this? It’s text facing the camera
np! if that doesn’t help you, check out this post or Set actor forward to look at target - Programming & Scripting - Epic Developer Community Forums
Find Look at Rotation is what you are looking for
OK this is helpful, but in the video he fix the problem of looking at the back of the text by simply rotating it. That works if the rotation-target is the actor not the text, but in my I have the txt inside a blueprint with some other stuff together and I don’t want it all to rotate.
Now I tried to add an offset, but that seems not working. Any idea how can I make this?
Got it.
Isn’t it insane that you need such a huge node-tree just for make an object look at you ???
Awesome! there was another person asking this question today as well so I sent him here
*sorry I’m not much help, I’ve only worked with C++
Lonewolph
(Lonewolph)
February 10, 2015, 6:15am
9
Sorry I am new to this. What is the - one with the 3 yellow and the + one with the 3 green…??
hahaha yeah…this is why I went the C++ rout XD
FVector CameraLocation = GEngine->GetFirstLocalPlayerController(GetWorld())->PlayerCameraManager->GetCameraLocation();
FVector objectlocation = ObjectComponent->RelativeLocation;
ObjectComponent->RelativeRotation = FRotationMatrix::MakeFromX(CameraLocation - objectlocation).Rotator();
the yellow one is vector - vector . The green is float - float
Ares9323
(Ares9323)
April 28, 2022, 11:36am
12
Maybe this function didn’t exist 7 years ago, but now you can do it in a much shorter way:
2 Likes