Search found 16 matches

by note173
Wed Apr 25, 2012 1:12 pm
Forum: General Bullet Physics Support and Feedback
Topic: After some time, my body becomes unmovable
Replies: 2
Views: 3578

Re: After some time, my body becomes unmovable

It's deactivation. After some time being inactive body goes to "sleep". Use body->activate(true) before applying any forces to make sure it's not sleeping.
by note173
Mon Mar 26, 2012 7:55 am
Forum: General Bullet Physics Support and Feedback
Topic: Constraint Motor at zero velocity
Replies: 3
Views: 4121

Re: Constraint Motor at zero velocity

This would lead to jittering and instability, you wouldn't be able to find correct coefficients for motors, and there will be an accumulating offset in every frame. This is how I actually got to my solution — motors are just a way to set velocities, so why not set it directly.
by note173
Fri Mar 23, 2012 9:29 am
Forum: General Bullet Physics Support and Feedback
Topic: Constraint Motor at zero velocity
Replies: 3
Views: 4121

Re: Constraint Motor at zero velocity

I have tried this approach to create wheel brakes, but it doesn't work. I ended up calculating the amount of distance a body moved from it's equilibrium and setting it's velocity to (-distance / fps).
by note173
Fri Mar 23, 2012 9:26 am
Forum: General Bullet Physics Support and Feedback
Topic: damped Generic6DofSpringConstraint under gravity unstable
Replies: 1
Views: 2669

Re: damped Generic6DofSpringConstraint under gravity unstabl

For some reason btGeneric6DofSpringConstraint does have only static (velocity-independent) friction. I"d suggest to subclass btGeneric6DofSpringConstraint and modify friction force calculation. There is even an example on this forum somewhere.
by note173
Thu Mar 15, 2012 11:26 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet on the cloud?
Replies: 5
Views: 7214

Re: Bullet on the cloud?

It works well in FPSs' without simulated rigid bodies. With the "real" physics, however, even 100ms lag would make user notice how his boxes are penetrating a floor. With some big random network lags the game would be totally unplayable. When using a local physics simulation even occasiona...
by note173
Tue Mar 13, 2012 12:39 pm
Forum: General Bullet Physics Support and Feedback
Topic: Bullet on the cloud?
Replies: 5
Views: 7214

Re: Bullet on the cloud?

Let's see. In an ideal case there will be a 100ms lag at best. It is a very noticeable delay, so you will probably want to implement some extrapolation which can be good in only one case: using the same physical engine as server does. So it would be in the end the same technique the most multiplayer...
by note173
Thu Feb 23, 2012 6:40 pm
Forum: General Bullet Physics Support and Feedback
Topic: Timestep and erp
Replies: 1
Views: 3991

Timestep and erp

A strange thing happens, when I change the fixedTimeStep (3rd parameter of stepSimulation) to some small value (1 / 400, for example). All spring constraints seem start to have more "strength". I adjust erp parameter: float physicsResolution = 1.0f / 60.0f / 10.0f; float dt = timeSinceLast...
by note173
Mon Feb 20, 2012 6:51 pm
Forum: General Bullet Physics Support and Feedback
Topic: Custom vehicle braking
Replies: 4
Views: 4090

Re: Custom vehicle braking

PhysX does it too, but probably faster, since it runs very smooth on mobiles.
by note173
Mon Feb 20, 2012 4:25 pm
Forum: General Bullet Physics Support and Feedback
Topic: Custom vehicle braking
Replies: 4
Views: 4090

Re: Custom vehicle braking

I've managed to emulate static friction by remembering constraint angle when wheel's angular velocity reaches small threshold or changes direction, then setting it's angular velocity to [(angle - angle_static) / fps]. It's not perfect, the wheel still has some difference from the state it should be ...
by note173
Fri Feb 17, 2012 5:41 pm
Forum: General Bullet Physics Support and Feedback
Topic: Custom vehicle braking
Replies: 4
Views: 4090

Custom vehicle braking

There is a custom vehicle made of rigid bodies and joints, wheels are cylinder shapes connected to body using hinge constraints. I can't figure out how to implement brakes. Wheels have very large friction coefficient, and the vehicle must be able to stand still on very steep (almost vertical) surfac...
by note173
Fri Feb 17, 2012 10:29 am
Forum: General Bullet Physics Support and Feedback
Topic: btGenerateInternalEdgeInfo double vertex buffer locking
Replies: 0
Views: 2146

btGenerateInternalEdgeInfo double vertex buffer locking

It seems that btGenerateInternalEdgeInfo locks vertex buffer of striding mesh interface twice: Before the (triangleIndex, numFaces) loop: ... meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts, type,stride,&indexbase,indexstride,numfaces,indicestype,partId); ... then, in th...
by note173
Sat Feb 04, 2012 6:54 pm
Forum: General Bullet Physics Support and Feedback
Topic: Objects bounce on triangle mesh edges
Replies: 1
Views: 2817

Objects bounce on triangle mesh edges

The moving object is a constraint-based vehicle, it has springs to damp bumps on ground's surface. The ground is represented by static triangle mesh shape (bvh). I use btInternalEdge utility, but wheels still do bounce on edges of perfectly flat triangle surface. Maybe enabling split impulse helps a...
by note173
Sat Feb 04, 2012 6:45 pm
Forum: General Bullet Physics Support and Feedback
Topic: Friction sound
Replies: 4
Views: 4643

Re: Friction sound

Thank you, it gave me a direction to think on.

And how do you handle rolling objects? They may have opposite velocities, but every contact point will be fixed in objects' local space (if there is no slipping).
by note173
Sat Feb 04, 2012 6:26 pm
Forum: General Bullet Physics Support and Feedback
Topic: parameters of the Constraints Constructor
Replies: 1
Views: 2525

Re: parameters of the Constraints Constructor

These are constraint points in objects' local space.
by note173
Wed Feb 01, 2012 7:51 am
Forum: General Bullet Physics Support and Feedback
Topic: Friction sound
Replies: 4
Views: 4643

Friction sound

I've managed to do simple contact sound effects (iterating over contact points every simulation tick and taking m_appliedImulse). But how can I implement friction sound (e.g. when vehicle tires slide or a crate being dragged)?