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

Body.sleepTime uses Infinities + can create sleeping Body #121

Closed
wants to merge 9 commits into from

Conversation

thygrrr
Copy link

@thygrrr thygrrr commented May 8, 2024

RigidBodies can now be created InActive via optional boolean parameter to World.CreateRigidBody(...), which defaults to true, the former behaviour.

RigidBodies track their sleep time using float.PositiveInfinity when deactivated, ensuring they really never wake up on their own.

Unit Test Cases added in ActivationTests.cs

@notgiven688
Copy link
Owner

You added world.CreateRigidBody(false) which creates an inactive rigid body. This will not help to build inactive structures since settings body.Position activates the bodies again.

@notgiven688
Copy link
Owner

notgiven688 commented May 31, 2024

Deactivation will be done by the regular sleeping system of Jitter. (i.e. deactivation time > sleep threshold). float.PositiveInfinity will be used (see #147).

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.

2 participants