Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[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

alt text

Product Version: Not Selected
wr.jpg (237.1 kB)
more ▼

asked Dec 11 '14 at 03:39 AM in Blueprint Scripting

avatar image

371 55 49 64

avatar image Bonadew Dec 19 '14 at 08:14 PM

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();
avatar image LitStudio Dec 19 '14 at 10:02 PM

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

avatar image Bonadew Dec 20 '14 at 12:46 PM

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.

avatar image LitStudio Dec 21 '14 at 06:20 PM

okay! Thanks :D

avatar image Crocopede Jan 19 '15 at 07:54 AM

Also want this feature

avatar image Bonadew Jan 19 '15 at 08:04 AM

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.

avatar image spyro Jun 24 '15 at 04:55 PM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question