Report any bugs here and we'll post fixes
Moderators: Sascha Willems, Thomas
by Lax » Wed Feb 12, 2025 5:21 pm
Hi Julio,
I found out, that in the newton version 3.14 the NewtonBodySetFreezeState does not work anymore. The body is still moved by physics.
I digged deeper and found out that calling:
- Code: Select all
void dgBody::Freeze ()
{
if (GetInvMass().m_w > dgFloat32 (0.0f)) {
if (!m_freeze) {
m_freeze = true;
for (dgBodyMasterListRow::dgListNode* node = m_masterNode->GetInfo().GetFirst(); node; node = node->GetNext()) {
dgBody* const body = node->GetInfo().m_bodyNode;
body->Freeze ();
}
}
}
}
is called, and the m_freeze set to true. But m_freeze is not used in any other place in newton, so all bodies are still updated...
I hope, that can be fixed for the old newton version.
Best Regards
Lax
-
Lax
-
- Posts: 182
- Joined: Sat Jan 08, 2011 8:24 am
by Julio Jerez » Thu Feb 13, 2025 2:49 pm
That could be.
if I remember correctly Freeze was a functionality of the early version of the engine what a body could be set to equilibrium even what it wasn't.
That was only to try to emulate the cheats by some engine when the put thousands of barrels or other stuff and the shot a bullet and the stack blue up, misleading the people.
in early newton that when the engine was doing islands that flag was not an issue.
however, by the end of 3.14 the engine became island less, or the entire scene was just a giant island, there so the flag became problematic and ignored it.
it is like this. Say you have a truth table of few variables. adding one extra variable double the number of possible states.
anyway, surprisingly enough. I may have to enable that option again.
Now that I am working in an unreal plugin, I find out that in unreal when you start a scene.
the start code has a time out that if the if a tick function, then more than I believe a few frames ticks
Unreal terminate the level.
That mean that I can't set large scenes, because they take a few milliseconds to settle.
So, it seems that option can be handy after all but not for cheating reasons.
I will work on it soon, and if it easy to re enable in 4.00 I will retrofit it 3.14
I thought you were on 4.00 any way
-
Julio Jerez
- Moderator

-
- Posts: 12425
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by Lax » Sat Feb 15, 2025 11:24 am
Hi Julio,
thanks for your information. Indeed this will also be required for Unreal plugin, as it is also a level editor and bodies should be able to get into sleep state.
I looked again at newton 4.0. But I have a child now and have no energy to port the tons of code from newton 3.x to 4.x
I wait, that hopefully, someone in the future writes another OgreNewt4.0 Wrapper, I could orientate on and enhance it.
Best Regards
Lax
-
Lax
-
- Posts: 182
- Joined: Sat Jan 08, 2011 8:24 am
Return to Bugs and Fixes
Who is online
Users browsing this forum: No registered users and 1 guest