Bepu v2 vs PhysX
Posted: Thu Sep 12, 2019 4:18 am
So I've got Bepu v2 running on my server, and I'm using Unity to render the clients. In an effort to reduce the amount of packets I'm sending, I decided not to send regular positional updates for cannonballs. Instead, I simply send over the position where they're spawned and their starting velocity. Once they collide with something I'll send another packet letting clients know to make it explode.
However, I intend to simulate the movement between those two updates locally (during that time gravity is the only thing affecting them). I was hoping that I could get away with just using Unity's built-in physics (PhysX) instead of going through the process of implementing Bepu on the client as well.
I wouldn't mind sacrificing a little accuracy, and I didn't really expect it to go well since it's two completely separate systems.
Strangely enough, PhysX's gravity seems to be stronger than Bepu's. I made sure both are using the same gravity vector as well as the same timestep, but my cannonballs lose height faster on the client than on the server.
Now, I completely understand that there's probably no way to cleanly account for this, but I wanted to ask if you had any insight on how PhysX calculates gravity or what might otherwise be affecting it. I'm not really expecting a fix (I'll probably end up sticking Bepu into Unity, unless you've got a better idea), so this question is more to satisfy my curiosity.
However, I intend to simulate the movement between those two updates locally (during that time gravity is the only thing affecting them). I was hoping that I could get away with just using Unity's built-in physics (PhysX) instead of going through the process of implementing Bepu on the client as well.
I wouldn't mind sacrificing a little accuracy, and I didn't really expect it to go well since it's two completely separate systems.
Strangely enough, PhysX's gravity seems to be stronger than Bepu's. I made sure both are using the same gravity vector as well as the same timestep, but my cannonballs lose height faster on the client than on the server.
Now, I completely understand that there's probably no way to cleanly account for this, but I wanted to ask if you had any insight on how PhysX calculates gravity or what might otherwise be affecting it. I'm not really expecting a fix (I'll probably end up sticking Bepu into Unity, unless you've got a better idea), so this question is more to satisfy my curiosity.