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

About friction #7

Open
Foxtr0t1337 opened this issue Dec 22, 2022 · 2 comments
Open

About friction #7

Foxtr0t1337 opened this issue Dec 22, 2022 · 2 comments

Comments

@Foxtr0t1337
Copy link
Contributor

I've seen your achievement in friction sim.
I believe that the glm::vec3 tangent is already equal to fVel.
You just need to length it, no need to dot about.
Maybe I'm wrong...
I shouldn't pull the change since I haven't tested it.
But I think it will be okay if you use the
fVel = glm::length(tangent) anyway.

@Delofon
Copy link

Delofon commented Dec 24, 2022

Why would they be equal? That may happen only if rVel is perpendicular to the collision normal (i.e. dot(rVel, manifold.Normal) is equal to 0), which is not always the case:

image

P.S. The logs in the image are from my engine which uses a similar impulse solver anyway.

@Foxtr0t1337
Copy link
Contributor Author

Why would they be equal? That may happen only if rVel is perpendicular to the collision normal (i.e. dot(rVel, manifold.Normal) is equal to 0), which is not always the case:
According to the code.
Image
It should be always equal.

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