In my code I need to set the linear factor for velocity to 0 (sometimes). For example, game->rigidBody->setLinearFactor(btVector3(0, 0, 0)); When this is done, collision detection continues to work, however, collision response fails to work. Essentially running as if there were not colliders at all. I think this is because it applies a velocity to solve the constraints.

Is there an alternative to setLinearFactor or is there another Constraint Solver which does not rely on velocity?

I am using the default btSequentialImpulseConstraintSolver();

  • \$\begingroup\$ If alternatives to setLinearFactor are also valid solutions, then you might not want to require "linear factor of 0" right in your title. Could we rephrase your question as "How to halt motion while still handling collisions"? \$\endgroup\$
    – DMGregory
    Apr 25 '19 at 14:58
  • \$\begingroup\$ Sure. That probably makes more sense. \$\endgroup\$
    – Vitulus
    Apr 26 '19 at 5:37
  • \$\begingroup\$ @DMGregory actually, handling collisions where it would snap to instantly solve the constraint is really what I want. Because the current colliders where you are inside the collider you are not instantly snapped but slowly moved with velocity which is weird. It's small affect but when changing from convex to simple triangles it makes it easy to go inside the shape. \$\endgroup\$
    – Vitulus
    Apr 26 '19 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.