Editing Character.h to change BP behavior?

Long story short: I want to use character movement but I want to be able to change the location of my capsule component. I’ll still have one, but I don’t want it to be locked at 0,0,0. I want to do this in Blueprints. Because the capsule component is locked in position. i can’t move it when I crate a sub class in BP off of the C++ char class.

Anyone know how to make this component editable? I tried changing the line that says BlueprintReadOnly to BluePrintReadWrite for the capsule component in Character.h and recompiled the editor but it didn’t seem to make any difference.

The capsule is the root component of ACharacter, and as such the transform should not be changed because it will become the Actor’s transform. What I think you should do is to create your own custom pawn, either by deriving from ACharacter or APawn. If you do derive from ACharacter then you can restructure the component tree and set the root component to something else and attach the capsule in the new root. Please note that I don’t know whether changing the component tree of ACharacter will introduce bugs or not, what I did in my game was creating a custom Pawn that is rather similar to ACharacter.

hmm its not a bad idea… but i dont mind having a capsule as a root in fact i prefer it. I just don’t want it to be locked. The main reason is I’m doing some VR testing so the transform of the capsule isn’t relevant to me. The space to move around in is about 5 by 5 ft. When you’re in the virtual space. The capsule component is a real nuisance cuz it always sits in the CENTRE of the space. Even if the VR player moves about the area physically(walking around in real life). The issue with this is if you want an enemy to attack the player, they always go for the root. Technically the player can stand a foot away from the capsule and watch the enemies attack it like an idiot. I have a separate capsule that is locked to the camera which is locked to hmd(headset). Its the true “body”. I want that to be the root and I want it to move around the space with the Camera/Headset.

Even if i add other code to get around the fact that the root is the target of other actors, it also causes havoc when using other controls to move the character around. Like i can be 5 feet away from the capsule and it will block me from moving even tho I’m no near the wall yet in my vision. I have a different method that extends from the actual body attached to the headset to account for blocking when near objects. I tried just removing the collision on the capsule and hoping the collision on my dynamic capsule would keep the char on the plane, but they fall thru.

I made a standard actor with a floating pawn component. This works better but then the challenge comes with simulating gravity when walking off ledges and launch char isnt available etc… hence i want to use char movement still.

I’ve gone through similar pains and ended up also using a pawn with a floating movement component. If you look in the UE4 roadmap they have a task for using the character movement component on any pawn.

A major help for me was to use an extended player controller to act as the root for the camera and motion controllers and driving the pawn from the Playercontroller

That would be very helpful. Wonder when that will come into play.
There’s gotta be a way to make the capsule component in the Character sub class moveable even though it’s inherited. I don’t know C++ well enough to know where to make that change. I figured making the Capsule BlueprintrReadWrite in the Character class would have done it, but it has no affect. It cant be that difficult. If we could lock the root capsule to the location of the HMD by setting its location to match on tick, then that would feel a bit better I think.

I keep debating between floating and character. The floating feels more natural but it really limits what you can do easily with the environment. Like if you want to climb up a ledge for instance. You cant launch the char up and over to give that feel. You can set location and maybe interp to it. Blaaaah… there isn’t really any good options for this right now. Walking off a ledge means constant traces to see if theres no ground and then making them fall and… ya… For VR they just want you to make sure your player stands still and never moves around it seems.

I don’t think this would be worth it, but if you REALLY wanted to change Character.h like you said, you’d have to download the engine sources, change Character.h, and compile your own custom engine version (which you will need to maintain manually for each new update). So yeah, you’re better off with an alternative like what’s mentioned above

Making your own branch can be worth it if you’re doing something pretty major (like making a new shading model), but it’s way too much trouble for something as small as this

Perhaps. But the alternatives mentioned arent really detailed or explanatory. I don’t really know how to go about that without some more help.
I already use the source version. I made the edit I mentioned above, changing the Capsule component to BlueprintReadWrite. I recompiled and launched the editor. The component is still read only though so that didn’t seem to do anything. I did all that before posting.

I dont mind maintaining my own branch for this project.
I’m sure this will get addressed better in the future but to stabalize what I’m trying to do now, I dont mind.