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"

moving the CapsuleComponent - starts at feet?

Hi all,

We've noticed (as seen in the image) that when you create a character blueprint, it automatically adds a CapsuleComponent to the components list. We've also noticed that the capsule looks to be centered by its object center then put to the 0,0,0 point on the grid, which means half the capsule is through the floor. We can't seem to find a way to move the capsule to fit the character.

As an easy solution we've just moved our characters down to match the component, but this seems like a very odd practice. Is this intended? If so, is there a purpose? We like learning. :)



alt text

Product Version: Not Selected
more ▼

asked Mar 11 '14 at 05:40 AM in Everything Else

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1988 9113

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

2 answers: sort voted first

"As an easy solution we've just moved our characters down to match the component, but this seems like a very odd practice."

Yes that is the correct thing to do!

You should expect to have to do this :)

You can increase the dimensions of the capsule to fit larger characters and then adjust the Character Mesh relative offset till the feet are at the bottom of the capsule



more ▼

answered Mar 11 '14 at 05:40 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1988 9113

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 05:40 AM

Thanks Rama!

It wasn't causing us any problems, but it's something we felt was odd and it happened at the root of our character and animation pipeline, so we wanted to make sure we were doing it right before it caused a ripple effect and we had to redo animations or the rig or something.

avatar image Sherif Riad Aug 04 '15 at 10:16 PM

I don't wanna look stupid but we are actually moving on from Unity Engine professionals into Unreal Engines starting up! so in my old days, the player capsule should be first zeroed on the ground (the capsule bottom edge is at level 0 with ground) then we adjust the player inside it because this capsule in Unity means collide for physics and you don't really wanna walk with you entire lower half inside the terrain! :D but that was in unity.. now even that I know this capsule is not a collide nor related to physics but I see no reason to leave it half sunk on the floor level 0 like that, I mean shouldn't we adjust it first to float on the floor as long as we have the option now in UE4.8? or it really doesn't matter? I think I need a little bit of understanding what is the really purpose and editing effects of this player capsule. thanks in advance!

avatar image Kirkules Apr 11 '17 at 06:10 PM

I know this is an ancient thread, but I still don't understand the answer. The capsule component of a character is still centered at 0, 0, 0 in ue4.15. What's the point of having a "floor" in the blueprint viewport editor if it's supposed to go through the middle of everything? The floor should be a guide for ensuring your components are set up right so that character will standing on top of whatever surface you want it to stand on, not just an axis plane...

avatar image smt Oct 12 '17 at 01:34 PM

Trying to learn ue4 right now and I totally agree, while I am totally fine with this working as intended, showing the grid/'floor' in the blueprint editor as going half way through the capsule is incredibly confusing and looks like it's straight up set up wrong

An example with the full 'solid' floor turned on for clarity: https://i.imgur.com/H11gtYj.png - of course I've moved my mesh into it and when placing it in the world it's totally fine, but in the editor this is pretty confusing and does look as if it would cause issues

avatar image Jin_VE Feb 13 '18 at 06:01 PM

The capsule origin makes even less sense when you realize that crouching changes the world location and many components attached to the capsule have to be moved.

If there can't be an option to use the bottom as the origin then there should at least be a second capsule component available with that capability.

And if an old thread is still relevant then it's fair game, IMO, and this will continue to be an issue until it's addressed.

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

So I decided to take my own advice and I managed to get a character with its origin at its feet. I didn't need to change the engine source and it seems to work well, but I haven't tested every aspect of character movement. I know it works on standalone and online multiplayer. I know it handles walking, crouching, and falling. I can't speak to the other mechanisms (e.g. flying, swimming). I can't make any guarantees that all my changes were right nor am I certain I did not introduce bugs. Time will tell.

The project contains two components: GroundCapsuleComponent and GroundMovementComponent. Use those instead of the standard components and your character will get its origin where the capsule meets the ground.

Here is a git of the project. You can use the two components in your own project, but make sure you change "CAPTEST_API" in the class declarations to your project's "..._API" name.

I'd love it if this got used and improved. My only request is that you share your improvements by updating my git. And if someone wants to get this into the engine, that would be great.

more ▼

answered Feb 14 '18 at 06:09 PM

avatar image

4.4k 32 77 41

avatar image Jin_VE Feb 15 '18 at 06:49 PM

Update: Some other classes assume the actor origin is in the middle of the capsule. It's mostly the AI stuff. The main problem right now is that UNavMovementComponent::GetActorFeetLocation isn't virtual. I had to edit the source to override it. It's interesting though, I'm just doing this for completion. My game did not have any noticeable effect when using the original functionality. My players and AI all work the same as they did with the original components.

Also worth noting that using this ground-based origin, my code got a lot cleaner. I honestly can't imagine why anyone would have started with the capsule-center origin method in the first place. It takes extra work to accommodate it.

(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