Hi there, I am relatively new to JMonkey and just getting started building a simple JumpAndRun. I want to use the blocks framework from GitHub - rvandoosselaer/Blocks: A block (voxel) engine for jMonkeyEngine .
My problem at the moment is that when the character (BetterCharacterControll) jumps onto a block and hits its edge he gets launched into the air, with his velocity increasing from ~4 → over 9. The creator of blocks says its not his framework, so my question is: What in bullet could cause this behavior?
I have had a deeper look into the matter and it seems as if the velocity of the object increases a lot in the collision tick (4 to > 9), so I implemented a custom PhysicsTickListener, but that only solves the problem after each tick, so you can still feel the boost very well. If you want to enable my ‘fix’ remove the comment on line 46 in PhysicsTickHandler.
Hi, thanks for the quick reply, yes I already tried setAccuracy, didn’t think setGravity would have any effect, will try.
I uploaded my code to explain him some bugs I found in his code that would crash his framework every time when used on windows (And I don’t have enough rights to upload my code here)
Generally i had issues with BetterCharacterControl myself, its not perfect i know.
Im not sure how “block terrain collision shape” is generated. But for collision shape there are also options that could help.
When i was creating own Voxel library, i had a lot of issues with Collisions, i had freezes and also parts were “throwing fast” or similar issues. But i just had to setup proper collision shape for voxel and i was able to create nice destrucible voxel like here:
Its nice you already reported issues for him.
If he tell its not “his framework issue”, i can only belive that.
Can i ask you, do his framework create “Collision Shapes” or you create it yourself?(sorry i dont open zip file again)
What i would also check when i would be you, is how other Collision Shapes (other that BetterCharacterControll is using) behave when contact this “hits its edge he gets launched into the air”. If other collision shapes will also have issues, then i would look issue in collision shape of voxel terrain itself.
Because what i learned based on my own issues, a lot of issues are because of collision shape types.
you can also try to visualise the generated collision mesh (to make sure there isn’t something weird in the collision mesh generation), to see what is going in the scene:
You can use imgur to upload images and link them here.
My next step would be to try to swap out the BetterCharacterControl as Paul mentioned. Creating a CapsuleCollisionShape and push it with some forces against the blocks.
I will try out some other shape then, my only problem is, that I am relatively new to Java (Python is my long main language) and that I just started using JME. Should I extend BetterCharacterControl and change the getShape() or write a completely new one?
yes, but what exactly need is Video/screenshot of some “moveable” Collision shapes that contact terrain edges.
I will try out some other shape then, my only problem is, that I am relatively new to Java (Python is my long main language) and that I just started using JME. Should I extend BetterCharacterControl and change the getShape() or write a completely new one?
The new one i belive.
Like people mentioned:
My next step would be to try to swap out the BetterCharacterControl as Paul mentioned. Creating a CapsuleCollisionShape and push it with some forces against the blocks.
You may want to try a non-BetterCharacterControl test to see if it’s something specific to that class.
Like, create your own rigid body with a capsule shape and see how it behaves against the block edges.
What i would also check when i would be you, is how other Collision Shapes (other that BetterCharacterControll is using) behave when contact this “hits its edge he gets launched into the air”. If other collision shapes will also have issues, then i would look issue in collision shape of voxel terrain itself.