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

keep velocity after collision #46

Open
Toastaspiring opened this issue Apr 11, 2023 · 1 comment
Open

keep velocity after collision #46

Toastaspiring opened this issue Apr 11, 2023 · 1 comment
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@Toastaspiring
Copy link

Dear jaipack17 or Git User,

Of the many methods you scripted, the one I like the most is RigidBody:ApplyForce(). However, I've been stumbling upon a problem recently. While trying to calculate the new velocity after collision seems nice in theory it seems the force is reset due to the CollisionResponse defined in the Runner file.

Is there a way to Add up the Forces? or a calculation which would work in my case?

PS: I experimented with a ball colliding and accelerating in an empty box

@Toastaspiring Toastaspiring added help wanted Extra attention is needed question Further information is requested labels Apr 11, 2023
@jaipack17
Copy link
Owner

You can increase the force vector you are passing into RigidBody:ApplyForce(force, time) every certain amount of time to achieve that maybe, If that fulfils your requirement? You can also specify a time (in seconds) if you want the same force to act for a period of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants