[UMG 3D Request] Face Player Camera Button

Would be awesome if exist a checkbox like this to we setup our 3D widget to always face player camera like Material Billboard…with this we don’t have to worry with the rotation of 3D Widget

I created a very simple SceneComponent that will always face the camera so I can have any sub components rotated.
Was hoping that the widget jitter was caused by blueprints running after the components was rendered and that a SceneComponent would solve that. That was unfortunately not the case. But at least I got rid of the blueprint code.

 * CameraFacingComponent.cpp
 *  Created on: Dec 18, 2014
 *      Author: bonadew

#include "NonameProject.h"
#include "CameraFacingComponent.h"
#include <Engine.h>

UCameraFacingComponent::UCameraFacingComponent(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
	bAutoActivate = true;
	PrimaryComponentTick.bCanEverTick = true;

void UCameraFacingComponent::TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction)
	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
	APlayerController* playerController = GetWorld()->GetFirstPlayerController();
	if (playerController && playerController->PlayerCameraManager) {
		FVector cameraLocation = playerController->PlayerCameraManager->GetCameraLocation();
		FVector componentLocation = GetComponentLocation();
		FRotator rotation = FRotationMatrix::MakeFromX(cameraLocation - componentLocation).Rotator();

How I can add this code to my unreal \\ I never worked with code…only blueprints…

If you don’t have a compiler installed then it would be quite tricky.
I guess you would have to ask someone to make you a plugin that you could add to your installation. Building plugins is something I have never done, but I think the code would have to be cross compiled for every platform it should support.

okay! Thanks :smiley:

Also want this feature

There’s an option, in 4.7 at least, on the 3d widget to project it to screen space instead and that will cause the widget to always face the camera. The downsides are that they will be rendered on top of all other layers and not hidden by geometry or scaled according to distance. It also makes the engine crash almost 25% of the times I hit play.

In my case, the 3D widgets doesn’t even show up in world-space. It works in screen-space.