Physics improvement
Physics improvement
OpenMW physics are kinda bad, constantly falling through floors and other problems. I have been looking into our physics system a little trying to understand it for the past 2 days. Mainly physic.hpp/cpp, physicsystem, and bullet_nif_loader. I plan on looking into Project Aedra to see what they are doing differently, hopefully whatever it is can be applied to openmw.
Re: Physics improvement
Okay, but wasn't gus planning to do the same? If so, you probably should coordinate with him.
Re: Physics improvement
Here are some important paramters:
*setMargin() in collision shape
*gravity
*the whole btKinematicController stuff
IMO, you should check first which kinematicController aedra use.
*setMargin() in collision shape
*gravity
*the whole btKinematicController stuff
IMO, you should check first which kinematicController aedra use.
Re: Physics improvement
Gus, we can work together on this if you want
Re: Physics improvement
sure
btw, i'm often in the irc channel.
but for now, i'm focusing on the crash related to the physic system. Which version of bullet do you have btw? Because i've a strange bug with bullet 2.76 (basically i can't use the debug mode... very annoying)
btw, i'm often in the irc channel.
but for now, i'm focusing on the crash related to the physic system. Which version of bullet do you have btw? Because i've a strange bug with bullet 2.76 (basically i can't use the debug mode... very annoying)
- psi29a
- Posts: 5362
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Physics improvement
The latest stable (and trusted) release of libbullet is 2.77, almost all of our releases packages are based on this as well.gus wrote:but for now, i'm focusing on the crash related to the physic system. Which version of bullet do you have btw? Because i've a strange bug with bullet 2.76 (basically i can't use the debug mode... very annoying)
We will not be upgraded until 2.80 is released as versions in between have a horribly crippling performance bug.
Re: Physics improvement
Got the latest Project Aedra from the svn. It doesn't use btKinematicController.
Re: Physics improvement
Changing our capsule width seems to eliminate the falling bug. But areas where we should fall now don't always work correctly.
Re: Physics improvement
I remember using blender game engine (bullet physics) lots of people would make their player code cast rays (from the previous location to current location) to test if the base of the player object had glitched through and if so, place the player back at the previous tick position. Otherwise I would find it always falling through, especially through edges that border changes in surface direction.
This might be too 'hackish' for openmw though.
This might be too 'hackish' for openmw though.
Re: Physics improvement
Why not? If other stuff do not work, we might try that, thanksI remember using blender game engine (bullet physics) lots of people would make their player code cast rays (from the previous location to current location) to test if the base of the player object had glitched through and if so, place the player back at the previous tick position. Otherwise I would find it always falling through, especially through edges that border changes in surface direction.
This might be too 'hackish' for openmw though.
jhooks1: I think we should first determine the right gravity to apply, because many other parameters depends on the gravity. With a small gravity, you don't go through the floor etc.