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

PxArticulation::applyImpulse - documentation contradictory #125

Open
philipguin opened this issue Feb 29, 2020 · 3 comments
Open

PxArticulation::applyImpulse - documentation contradictory #125

philipguin opened this issue Feb 29, 2020 · 3 comments

Comments

@philipguin
Copy link

So looking in PxArticulation at the documentation for methods applyImpulse and computeImpulse, they're described as affecting the "entire" articulation, while also accepting a link parameter described as "the link to which to apply the impulse." What do I expect here? Why does it accept a pointer to link instead of a reference? Can I leave it NULL to affect the entire articulation as desired (e.g. in the case of gravity?) Or can I only affect one link per call?

@kstorey-nvidia
Copy link

You must provide a link that the impulse is applied to. The impulse applied to that individual link will be propagated through the entire articulation. This can cause a change in velocity of some or all of the links in the articulation, depending on the degrees of freedom of the articulation and the direction of the impulse.

@philipguin
Copy link
Author

I see. So is this is a natural consequence of joints acting as "constraints"? I would normally think of forces as propagating over time via simulation, but I suppose a constraint would mean that the change is propagated instantaneously, by definition. For something like gravity, then, I suppose I would just call "applyImpulse" for each individual link? Sounds like order may be an issue.

@kstorey-nvidia
Copy link

If you apply forces on all links, the resulting velocities should be the same regardless of the order in which you apply them

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