Kinematic Character Controller

Hey monkeys! This is my first post here so, hello all! =)

I’ll be direct. I’d like to write a Kinematic Character Controller for me (and if I manage to do so, for JMonkey too). The deal is, I’d like to start first using the bullet kinematic character controller just to see if I can cut tons of work. The problem is I don’t seem to have access to jbullet internal classes in jme3. I could do this in LibGDX with ‘their’ jbullet.

Is there anyway to access those internals?

Also, JMonkey needs a kinematic character controller:
https://developer.nvidia.com/sites/default/files/akamai/physx/Docs/CharacterControllers.html
http://www.digitalrune.com/Support/Blog/tabid/719/EntryId/40/Kinematic-vs-Dynamic-Character-Controllers.aspx

A awesome game engine needs an awesome character controller.

Have you tried using the BetterCharacterControl? I think it’s intended to address those issues and is also extensible.

I’m using it. It is a dynamic character controller. It uses a capsule physics object and so far I have had all the issues listed. Just create a terrain and place a BetterCharacterController and you’ll have bouncing, flying over hills and getting stuck when facing slopes with high angles. The gravity feels quite unrealistic too. I can post a test code I wrote here that demonstrates this behavior. BetterCharacterController can’t fix most of those issues since it is a dynamic character controller.

Trust me the cinematic controller has even worse issues in a 3d context.
At least if we sepak about the one that comes from the bullet c++ stuff.

-> It easily tunnels
-> It can bug fly :slight_smile:
-> it randomly gliches (ever played Skyrim? like that but way worse)

cinematic was a typo?
Well, then I’ll need help to tame the dynamic one because in my tests I’m getting very bad results.

maybe you could show us your tests, we are not clairvoyants

1 Like

The code is a frankenstein since I copied and fixed another guy’s code to test. I just wanted to see results before I start creating the game I have in mind. I’m still choosing the engine I’ll work with, but I really hope I can use this one… cause you know… java is awesome.
So the code is quite simple, a BetterCharacterControl (which I already tested a wide variety of values to fix the issues) and a terrain. Other things I remove or commented if one of you wants to run this code.
The terrain I’m using is the main source of the issues, is just a terrain with some hills and holes and a big high peak in the center. The issues I face are the character controler bounce against the floor when fast enought, it bounces also when you jump and hit a slope sometimes flying very high after the bounce. The controller also get stuck in the terrain some times, mainly when facing high slopes. When I go inside holes and then out, the controler flyies a bit (the dynamic character controller when going over ramps). I can manage to almos fly with it just by hitting slopes. I couldn’t test other issues because of the ones I currently have (couldn’t test how high the character can climb, the test gets biased because the character bounces over the highest hill).

http://pastebin.com/Pzug5v9g

I lowered the camera height and multiplied the character speed by the time per frame. Got better results but still dealing with problems that hold the development. The character gets stuck in each slope and also sometimes ‘fly’ when touching them. With the lowered camera now the ground texture is horrible. Jumping seems a bit more realistic now but I can still manage to fly using a combination of slope and jumping around.

I’m having a really bad experience with this engine.

The test:
http://pastebin.com/Df9efivV

Look at the source code of the BetterCharacterControl, extend it and change it to your liking.