#Physics & Collision Networking Test for Walking Inside of Simulated Spaceships While in Planet Orbit
1 messages · Page 1 of 1 (latest)
Well done, actually got recc'd this by YouTube before finding it here
I’ve been trying to do networked physics for so long, for a project similar to this one. I had indeed watched the Rocket League talk but didn’t think it would be easy to integrate Bullet into a UE5 project. I’ve explored every possible route to get chaos prediction working, including modifying the engine. Is your code open source, or do you have any guidance on how to replicate (heh) this? Thanks a bunch
At first I also didnt think integrating Bullet was gonna be easy, so I made my own physics solution but got stomped when I needed to implement collisions
So decided to give it a shot and Bullet was extremely easy to set up
It's pretty much just a plugin, you create a bp actor inheriting from its own C++ class and you're good to go
It's also easy to modify its source code, I made some of its functions callable from blueprints and it works like a charm
I can give you my modified version of the Bullet plugin if you want, all I did is to make stuff blueprint callable
Thats great to hear.
This would be amazing. Thank you
Definitely will have to dig more into how plugins work
There are still many unexposed functions, I only exposed the ones I needed like add force, torque etc
Had a friend set up a plugin for deterministic physics in Unreal, sharing with other. I am but a lowly artist and in no way an expert on the plugin sdk.
If you want, i can contribute to this and you can put it on GitHub or something. I’m sure there are many other poor souls struggling with the same problem
Also watch this, to see how to set it up after the plugin is installed
I implemented my prediction and rollback correction using blueprints, and it's probably far from optimized. It'd probably do more harm to open this to public lol
For now it works good enough for my project
If I ever make it more optimized and convert it to C++ I may put it on github
That’s amazing
I have the basic structure down but debugging has me thinking I have a long way to go
Can I ask how you managed IDs? Since many actors might be spawned at the same time across server and client their IDs might get confused
I made an actor component that manages the connection between the actor and the bullet engine, and it has an additional custom ID that I replicate.
So I basically have 2 IDs, one that represents the Actor itself and is replicated, and one that represents the Physics state (Rigid body ID) and is local only.
I use the custom ID for network stuff, and when it comes to applying physics changes I simply use the Bullet ID on the client
I’m keeping a TMap of serverID->clientID on each client’s physics world, seems to work so far.
Interesting, what is the value of bullet physics integration over Chaos? Is it that you have more fine tuned control over the physics simulation for network prediction purposes?
Yeah. Chaos is deterministic which makes it easier to synchronize, and it allows you to rewind and manually step the simulation
That said, less works out of the box...
Ah, you mean bullet right? 😅
Yeah sorry lol
Hell yeah, ID sync and server authoritative physics works amazingly. TODO: implement frame synchronization, then resimulation/prediction logic, then input buffering (I should probably make a new thread instead of hijacking this one, sorry) Thanks again for the inspiration @upper coral