Hello. I present to you the Kinematic Player Controller system.
- Support dynamic simulation in new version (see video).
Demo version is available at the link:Kinematic Character Controller by Dev68
Dynamic simulation (available in new version):
Hello. I present to you the Kinematic Player Controller system.
Demo version is available at the link:Kinematic Character Controller by Dev68
Dynamic simulation (available in new version):
very cool!
Great controller! Covers many features.
Wow that 360 degree run is wonderful!
As a jumper I usually judge games by their game mechanics and this feels pretty solid. You can’t do stuff like bunny hoping or surfing like in Counter Strike, but the 360° ball/ramp walking felt straight out of P0rtal, good job!
I’m sure you can make some interesting games with this (e.g. a puzzle).
What’s your plan, like open source it or use it in a game of yours?
Awesome controller!
I’m also currently in the process of integrating quake/source like movement in playcanvas.
How are you solving collisions? Are you using Ammo’s convexSweepTest? That’s what I’m going with, however I’m getting some undesired results, which I suspect come from floating point precision errors.
Quake movement is FPS dependent, so you would need a way to run it for instance at 125 FPS or use the pmove integration system from ioquake3 which makes it possible at e.g. 60 FPS. Since it’s all open source, you can just use emscripten for it too.
Hi, thanks for taking the time to rate this!
The controller is not limited in this; this can be solved with a couple of codes. I brought the controls as close to realistic as possible.
Even in the current solution I had an implementation of wall climbing.
Thanks for the information, but this controller has a different task, I did not initially plan it for a large number of FPS, because… I make web games, where 60 frames per second is considered the standard.
Thanks for the code excerpt!
What is your experience with the hitNormalWorld? Because for me it’s behaving weirdly especially around edges.
For example if I cast a box shape down onto another box shape and they only hit barely on the edge. I get a hitNormalWorld which isn’t pointing up. (collision margin set to 0 on both box shapes)
What I would expect is to get the hit normal of the face/triangle which is hit. But it seems like this is not the case.
I’ve did a bit of research and it seems like the hitNormalWorld isn’t the normal of the face which is hit. As discussed in this thread
it is the vector, connecting the two closest points, one on each object. Those two points are generated through a combination of several ‘getSupportingVertex’ calls, that can return an actual vertex of the original object, but also an implicit function (for spheres, capsules, cylinder, cone)
I’m still testing around and will create a demo scene which highlights this issue.
Similar issue for reference:
https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=12826
Unfortunately, I can’t answer this question for you, maybe after the demo project I’ll be able to understand what exactly is wrong.
FYI: I’ve created a test project for my problem. I also created a new thread as I don’t thinks this belongs in here.
Once again: Great work on your character controller!
Updated materials for everyone who has a license, as well as fixed many bugs and improved optimization.
If you want to join the community, write me a private message.
Added a fix for interactions with a dynamic body, when external forces were created that differed from real physics.
Added a third-party handler that allows you to process such contacts.
Before:
After:
Methods, memory allocations, reduction of calls to the physics engine have been optimized, you can read more about it on github.
Add support for engine 2.7.4
Add Flying State in ExamplePlayerController
Performance improved by about 4%
This is really great and I’m enjoying watching this project evolve. Minor point but I do find the mouse look to be a little sensitive. Would also be cool to constrain the camera so it doesn’t penetrate the environment. Otherwise, great job!
Improved system optimization, this demo scene has about 800 physical (kinematics, statics), 40 dynamic, 140 characters, allows keeping fps at 32 frames.
Upgrade:
Fixed the calculation of forces of the complex mover component when the player’s mover tried to balance the forces to keep a point on the ground.
Improved handling of complex rigid bodies when the player walks on a moving staircase.
Added handleObstructions for ExampleCameraController. (Request by @will )
Added support for using different physics engines. (Jolt , Ammo)
(Jolt Manager by @LeXXik)
Optimized mathematics of some methods.
For details, visit the project’s GitHub.
Before:
After:
What’s the URL - I don’t see it in the thread.
@will This is for people who have paid for a subscription.