x

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"

Spring Arm Component in Blueprint doesn't show translation and rotation.

Hey guys,

When I execute the following lines of code

in .h

     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Meta=(Category="Camera", AllowPrivateAccess = "true"))
     class UCameraComponent* PlayerPOVCamera;
 
     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Meta = (Category = "Camera", AllowPrivateAccess = "true"))
     class USpringArmComponent* PlayerPOVCameraArm;


and this in my .cpp

 PlayerPOVCameraArm = CreateDefaultSubobject<USpringArmComponent>("PlayerPOVCameraArm");
     PlayerPOVCameraArm->SetRelativeRotation(FRotator::ZeroRotator);
 
     PlayerPOVCamera    = CreateDefaultSubobject<UCameraComponent>("PlayerPOVCamera");
     PlayerPOVCamera->AttachTo(PlayerPOVCameraArm);

I can't seem to find the property editors for Translation and Rotation for the SpringArm component in the character blueprint editor. Any ideas on why this is happening and what is my potential fix?

alt text

Product Version: UE 4.11
Tags:
notranslation.png (356.0 kB)
more ▼

asked May 30 '16 at 02:42 AM in C++ Programming

avatar image

kishoreven
302 13 13 25

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Looks like it thinks it is the root. Add this line and see if it solves the Problem for you.

 PlayerPOVCameraArm->SetupAttachment(RootComponent);

And change the AttachTo line to:

 PlayerPOVCamera->SetupAttachment(PlayerPOVCameraArm, USpringArmComponent::SocketName);

more ▼

answered May 30 '16 at 03:04 AM

avatar image

Nachtmahr
6.9k 143 25 171

avatar image kishoreven May 30 '16 at 05:11 AM

K that seemed to have been the issue. For some reason I missed because I just transitioned to using NewObject and thought this wasn't necessary due to the outer object thing. My bad. But I do not have the SetupAttachment function in the API for scene component. Am I missing something? I did AttachTo now and it seems fine.

avatar image Nachtmahr May 30 '16 at 05:45 AM

Its a 4.12 thing =) you can use attach to.

From 4.12 Source: "SetupAttachment should only be used to initialize AttachParent and AttachSocketName for a future AttachTo. Once a component is registered you must use AttachTo."

(comments are locked)
10|2000 characters needed characters left
Your answer
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