-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jolt Physics integration #263
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updated build from source section for Jolt Physics.
This isn't going to work for all platforms, need to find a more generic way. Also need a way to turn off interprocedural optimizations for Debug and ReleaseGenericNoLTO builds.
The Jolt HelloWorld project says to use FetchContent.
It's downloaded through CMake FetchContent now.
This lets them compile with Jolt instead of having MD_DynamicRelease errors.
Added Git to third-party tools since CMakeLists.txt is using FetchContent now which does a git clone behind the scenes.
Updated the git submodule part to just be about vector instructions.
Moved around music installation so people try it before running the engine.
Figuring out as I go. Unfortunately it seems like I'll need to allow like 100k bodies to be instantiated which is a lot. Will need to prioritize mesh combining sooner than later.
Won't need this forever, just until mesh combining is figured out.
Crossing a chunk boundary is very expensive since I'm doing Add/RemoveBody() the naive way.
Currently at the origin, need to drive it around with game logic.
Fixes DebugRenderer init.
Tied to the gameplay side of voxels and entities. Jolt uses them to instantiate its own bodies.
Eventually want to remove CollisionMeshDefinition since physics engines prefer working with simple shapes.
Trying to put Jolt as the main one. Not sure the setPhysicsPosition() is correct everywhere now, might be half a height too high.
Now have a decent moving and jumping player that seems to not launch 500 feet in the air when jumping into a wall.
Allows for modding things like sunset time, etc..
So Visual Studio actually shows them in the tooltip.
Getting rid of this unused 7+ year old code and redoing with definitions and instances.
Will use actual player inventory eventually.
To be used for any inventories in the game (player, corpses, containers, ...).
Makes them more like a monkey now which isn't ideal but maybe helps with testing. Somehow need walls to not be considered steep ground. Maybe have to weld 2nd/3rd/4th floors together because Jolt thinks there's a "ground" face between them?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jolt colliders are now being used for all objects in the world. Movement is currently clumsy and unstable, but it's a big improvement from pre-Jolt times because it's like an actual game now. Debug rendering is implemented in F4.
Next objectives:
Tested on Windows, macOS, Debian, and Raspberry Pi and they all work. There do appear to be slight differences depending on math optimizations, but after adding a couple tiny epsilons like for jumping, that helped.