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

Problems with 3.14 #280

Open
KionX opened this issue May 28, 2022 · 2 comments
Open

Problems with 3.14 #280

KionX opened this issue May 28, 2022 · 2 comments

Comments

@KionX
Copy link

KionX commented May 28, 2022

NewtonBodySetCollidable(Body, 1); disables collisions for KinematicBody.

Also each NewtonWorld creates threads. It should use a thread pool.
I have many worlds. And Newton creates a total of about 100 threads.

@JulioJerez
Copy link
Contributor

JulioJerez commented May 29, 2022

NewtonBodySetCollidable(Body,1); disables collisions for KinematicBody.

the function only acct of the body that is called for. 1 should make it collidable, 0 no collidable. 0 is the default.
that is the expected behavior.

Also each NewtonWorld creates threads. It should use a thread pool.
I have many worlds. And Newton creates a total of about 100 threads.

instances of the engine are independent of each other, so thread are part of the engine.
the engine run on it own thread which is part of it.

If you are using so many worlds, then maybe for you should disable threading.
there is a define in the cmake script "NEWTON_BUILD_SINGLE_THREADED" that builds the engine single thread.
check that, and them the engine will run on the application thread.
them you can make your own thread pool and send the update as task, or you can run it however you like.

finally:
Newton 4. has been released for a while and is very stable, more accurate and a lot easier to use that 3.14
so if you are no too far alone, try integration 4 you can make so that them can coexist until you migrate to 4

@KionX
Copy link
Author

KionX commented May 29, 2022

1 should make it collidable
Now it works the other way around.

My worlds sleep most of the time. They remain in memory for a quick transition between them.
I don't have the option to upgrade to Newton 4 right now.

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