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"

C++ Pawn Doesn't Drop to Drag Location in Editor & Root Doesn't Move with Components

I didn't know how to properly express this in words, so I created a couple gifs of my issues. Basically, I created a C++ Pawn class, gave it a root component and a capsule component, then attached the capsule to the root.

Now when I try to drag and drop this C++ class to a specific location in the editor, it jumps to a random location (doesn't seem to default to the same location every time; it's always random)


That's the first issue.

My second issue is rather annoying, but I somewhat understand what is happening. If I change the transform location of the capsule component, the root component stays put (since the capsule is a child of the root obviously); only when I move the root component or entire class itself, does everything move in-sync. I would like to make it so that no matter what I'm affecting (as I may, sometime down the road, have a child selected and not realize it) everything moves in unison (i.e. "glued together") (or even to hide the transform widget, physics options, etc for everything except the root) would be awesome!


Here's the code excerpt from my .cpp file:

 PlayerRoot = CreateDefaultSubobject<USceneComponent>(TEXT("Player Root"));
 RootComponent = PlayerRoot;

 ColCapsule = CreateDefaultSubobject<UCapsuleComponent>(TEXT("Capsule Collider"));
 ColCapsule->AttachToComponent(PlayerRoot, FAttachmentTransformRules::SnapToTargetNotIncludingScale);


Product Version: UE 4.18
ept-issue-002.gif (235.5 kB)
more ▼

asked Nov 25 '17 at 11:20 AM in C++ Programming

avatar image

65 2 6 7

avatar image Ke9an Nov 28 '17 at 07:25 AM

bumpedy bump bump

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

1 answer: sort voted first

Is there some reason that you use FAttachmentTransformRules::SnapToTargetNotIncludingScale? I have not test it but I think that's why your component behave like this.

more ▼

answered Nov 28 '17 at 08:36 AM

avatar image

46 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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