Just what is a BetterCharcterControl?

Hi everyone, and welcome back to:
stupid questions with MisterCavespider

I have read all Hello... tutorials about a month ago and I have been working on several projects in the meanwhile.
One thing I tried had to do with the physics. For some dark, unknown reason, I tried using RigidBodyControls (dynamically) on Mobs, instead of just some kinematic Control. This lead to the realisation:

Just what am I doing?

However, I haven’t cleaned this mess up yet.

Later, when searching stuff on this forum, I came across something called a BetterCharcterControl, I have never seen that before. I re-read the physics tutorials, but I haven’t found any information about it. I just assumed it was something the user created himself.
Nevertheless, I came across it again, and it seemed as it was from jme3.

Thus my question:
What is a BetterCharcterControl ?

The BetterCharacterControl is actually included in the engine.
It’s a RigidBodyControl (internally) that stays upright and has a capsule mesh for collision. It also has some methods like “setWalkDirection()” that are useful for building player or NPC objects.


Can someone please update the wiki? Apart from that page, it isn’t mentioned anywhere.

I find old CharacterControl better, although it is deprecated. The BetterCharacterControl is supposed to be a working, but a very basic class which user should extend to customize it to their preferences.

Theres detailed javdoc for the BetterCharacterControl, just press Ctrl-Space on the variable.

So it’s just a non-deprecated Character Control?

Yes, and differently than the deprecated one, it is subject to forces like any other rigid body.

That’s exactly what I need.

Also please note that CharacterControl is deprecated on 3.0, but is “un-deprecated” on 3.1 :rolling_eyes:

1 Like