You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the force Vector is set to (0, 10, 0). Gravity in BulletPhysicsWorld is set to -9.81. The mass of the BBox is 1. I expected the box to slowly accelerate up, but it just drops to the floor.
The debug output tells me that both the Unity and the BPhysicsWorld provided frameCount do not increase by 1. Sometimes by 2, sometimes they don't increase. It is possible that I miss some frames? I'm clear on the fact that hovering this object can only work if the force is applied on every frame. As I increased the upward force, at some point there is some jerky movement of the box:
I am working on a new version of the Bullet Unity plugin that always does exactly one Bullet Physics timestep for each Unity fixed timestep. The timing is not 100% accurate but things behave MUCH better. It is not ready for release yet, but you can replace the code in BPhysicsWorldLateUpdateHelper with the code in this thread:
`protected virtual void FixedUpdate()
{
if (m_ddWorld != null)
{
float deltaTime = UnityEngine.Time.time - m_lastSimulationStepTime;
if (deltaTime > 0f)
{
///stepSimulation proceeds the simulation over 'timeStep', units in preferably in seconds.
///By default, Bullet will subdivide the timestep in constant substeps of each 'fixedTimeStep'.
///in order to keep the simulation real-time, the maximum number of substeps can be clamped to 'maxSubSteps'.
///You can disable subdividing the timestep/substepping by passing maxSubSteps=0 as second argument to stepSimulation, but in that case you have to keep the timeStep constant.
int numSteps = m_ddWorld.StepSimulation(m_fixedTimeStep, m_maxSubsteps, m_fixedTimeStep);
Hey everybody,
first of all thanks to @Phong13 for the awesome work!
I'm having trouble with a very simple test: I created Scene with BBox and added a Component that just adds an upward force as such:
the force Vector is set to (0, 10, 0). Gravity in BulletPhysicsWorld is set to -9.81. The mass of the BBox is 1. I expected the box to slowly accelerate up, but it just drops to the floor.
The debug output tells me that both the Unity and the BPhysicsWorld provided frameCount do not increase by 1. Sometimes by 2, sometimes they don't increase. It is possible that I miss some frames? I'm clear on the fact that hovering this object can only work if the force is applied on every frame. As I increased the upward force, at some point there is some jerky movement of the box:
https://youtu.be/tf4bAij0SAE
Please note that the same Script works as expected staying in the Unity PhysX World.
I didn't touch the Script Execution order or anything else. I'm using Unity 2018.2.5f1 Personal and BulletUnity from the Asset Store.
The text was updated successfully, but these errors were encountered: