[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.

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.

Thanks,

–Lina,

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?

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:

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.