Newton 2.24 Problem with AutoSleep

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Newton 2.24 Problem with AutoSleep

Postby mak » Mon Dec 05, 2011 12:57 pm

Hi there,

first - my apologies if this is answered elsewhere, I spent a while searching the forums but to no avail.

I've just leapt from 1.53 to 2.24 in order to get the iPhone libraries, but I'm having problems with 2.24 on Windows at the moment. I've taken a project which works just fine under 1.53, and updated the API usage to conform with 2.24. Largely this involved the additional arg passing of -1 for shapeId, and 0 for threadIndex (it's single threaded) . No logic has changed on my side of the fence, and the update was quite smooth.

But, when running my project - everything falls through the "floor" of the room mesh which acts as the container for the scene. The room is constructed from a model by adding each tri to a CollisionTree, and then finally passing that to the NewtonBody to construct it from the NewtonCollision object.

Basically, it seems the room is always asleep/in equilibrium - even when I immediately call NewtonBodySetAutoSleep(body, 0) as soon as I construct it - somehow it gets turned back on (no code of mine does this, I've ripped out all possible calls). I've got debug rendering which colours the mesh based on it's sleep/frozen/autosleep settings, so it's easy to spot what's happening.

My other objects behave just fine against each other - even when allowing AutoSleep - the only difference is that they are created using NewtonCreateConvexHull(...)

Even if I fire a working object at the faces of the room, the room doesn't wake up on contact and the object goes sailing right through it.

Any ideas? I've missed something in the API update? Some new logic path/setting which is needed?

Thanks in advance!
User avatar
mak
 
Posts: 8
Joined: Mon Dec 05, 2011 12:36 pm
Location: UK

Re: Newton 2.24 Problem with AutoSleep

Postby mak » Sat Dec 10, 2011 9:29 am

Solved myself - for some reason prior to 2.24 adding my custom mesh verts as A, B,C per tri worked - but now with 2.24, I have to reverse it and add C, B, A - and voila, it works.

Phew!
User avatar
mak
 
Posts: 8
Joined: Mon Dec 05, 2011 12:36 pm
Location: UK

Re: Newton 2.24 Problem with AutoSleep

Postby Julio Jerez » Sat Dec 10, 2011 10:19 am

Oh the faces were in different winding order? that could be, there are many architectural changes between 1.0 and 2.0 change.
but if tha was teh case then the collision shoucl have bit invisible to incomming faces.

I had then is visual studio source control, but aftet I swith to SVN, i chneg compurer few times and I lost those archives.
I has some very older 1.00 version in cd, but not worth to look at because they data from when it only handled Boxes, spheres and collision trees, and has with the bug of the time.

I am glad I have the code in google now, because it much safe and anyone go back to any version, unfortunally 1.53 is history, and even some elray version on 2.00 as well.
no one use newton should be in 1.53
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron