Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btRigidBody applyForce applyImpulse methods missing? #410

Open
dataexcess opened this issue Jan 11, 2023 · 1 comment
Open

btRigidBody applyForce applyImpulse methods missing? #410

dataexcess opened this issue Jan 11, 2023 · 1 comment

Comments

@dataexcess
Copy link

Hello!

I am looking for the following methods (present in the API docs of pybullet (https://pybullet.org/Bullet/BulletFull/classbtRigidBody.html)

Currently (please correct me if I'm wrong) the only method that seems available to set a rigid body in motion is the setLinearVelocity. The problem is that it ignores/circumvents other forces such as gravity it seems.

Thank you!

@lo-th
Copy link

lo-th commented Apr 13, 2023

you can use v = b.getLinearVelocity()
and add your velocity to v
and apply setLinearVelocity

note velocity is in world coordinate
so you can apply rotation of your object before add

you can also use
b.applyForce( v )
b.applyTorque(v)
b.applyCentralForce(v)
b.applyImpulse(v)
b.applyCentralImpulse(v)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants