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

Physics particles are initialized with velocity equal to initial position vector #81

Open
wants to merge 1 commit into
base: feature/no-org
Choose a base branch
from

Conversation

dgtized
Copy link
Contributor

@dgtized dgtized commented Mar 28, 2021

I was trying to start using the VerletPhysics routines, but ran into a problem where particles have an initial velocity.

I did some digging, and it looks like 9e0bba8 changed the initial conditions for particles to always set prev to be (vec2 0 0). Previously it set both current position and previous position to the initial position. The new behavior sets the initial velocity of a particle to (- pos (vec2 0 0)).

If the particles all start at 0,0 or very near this likely works out fine, but it seems like setting both pos and prev to the initial conditions would make more sense? Is there some other use case here I'm missing? Maybe the spring examples were in a coordinate system relative to origin?

Thank you for implementing all these geometry routines, it's been a really great & useful resource!

…tion vector

I was trying to start using the VerletPhysics routines, but ran into a problem where particles have an initial velocity.

I did some digging, and it looks like thi-ng@9e0bba8 changed the initial conditions for particles to always set `prev` to be `(vec2 0 0)`. Previously it set both current position and previous position to the initial position. The new behavior sets the initial velocity of a particle to `(- pos (vec2 0 0))`.

If the particles all start at 0,0 or very near this likely works out fine, but it seems like setting both pos and prev to the initial conditions would make more sense? Is there some other use case here I'm missing? Maybe the spring examples were in a coordinate system relative to origin?

Thank you for implementing all these geometry routines, it's been a really great & useful resource!
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

Successfully merging this pull request may close these issues.

None yet

1 participant