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"

[Request] Change RootComponent in custom character

Hi, I've noticed that currently one has to take an important and functionality-exclusive decision when working with the physical entity the player controls (custom Pawn or Character):

a) If you want to base the collision on a mesh, you need that mesh, static or skeletal, to be the RootComponent of the class (marked as [ROOT] in Components of the Blueprint, in Editor), and, as far as I know, that currently forces you to use a custom Pawn (like the Ball in the Rolling Template, whose Root is the ball mesh).

b) If you want character behaviour, functionality and variables already in a pretty advanced stage, you need a custom Character.

Conclusion: you can't have, by now, a custom Character with its collision based on a mesh or something different than the CapsuleComponent (unless you construct your class from Pawn but adding part of the Character functionality, which is possibly tedious and can bring problems).

Proposed solution: allow to choose, within the editor (in Blueprints' Components or Defaults) what should be the RootComponent of a custom Character blueprint.

Product Version: Not Selected
more ▼

asked May 14 '14 at 05:10 PM in Blueprint Scripting

avatar image

Albert Espín
987 81 98 361

avatar image nikolobin STAFF Jun 20 '14 at 08:42 PM

I'm so sorry for very delayed reply, but I don't think that's what we'd like to have eventually although I can see that is how it has been set up so far. I'm adding Zak here who has been working a lot on Pawn/Character movement. Hope he can answer it better.



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

1 answer: sort voted first

Character doesn't support more than capsule right now, though we may add box at some point. I doubt we will ever allow a mesh with collision as the root since a complex mesh shape makes all those nice features of Character movement extremely complex. It is all built around PrimitiveComponent, which is a shape primitive (Capsule, Shere, Box).

What specific problem are you trying to solve?

more ▼

answered Jun 20 '14 at 08:47 PM

avatar image

zeroexception STAFF
1k 18 16 39

avatar image Albert Espín Jun 21 '14 at 06:36 AM

Hi, thanks for answering Lina and Zak.

What I wanted to do here was to accurately detect when parts of the body (mesh) of a character hit another one, like a punch (that did cross the root capsule and so was not detected).

I solved it using traces in bone / socket locations continuously while the attack was being done. There's more information here, in my post marked as answer: https://answers.unrealengine.com/questions/46650/problem-character-mesh-not-generating-hit-events.html#answer-56482

So by now I haven't seen any other ocasion in which traces couldn't be a replacement for what I requested here.

That doesn't mean that it couldn't be a nice addition to add skeletal-mesh based collision for characters, but with some sort of collision hulls (UCX) to simplify collision enough not to kill performance, with advanced options like uniforming the collision of the feet with the ground so weird frictions don't happen there, etc. (it might be nice to have different collision hulls for different parts of the body, as some might be much more complex and convex than others). I understand this would be difficult to implement.

(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