A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Neo » Sun Jun 03, 2012 1:17 pm
Julio Jerez wrote:NewtonReleaseCollsion is deprecated.
you can try using the scale feature of the collsion to match the size of you visual mesh
Sorry for my lately reply after 2 day's off...However, it works all right now since i use the collison scale function. Thx.
It seems that NewtonCollisonScale is a new function added in 300.
now the code is like(maybe turtorials should update then?

)
- Code: Select all
matrix4 matrix;
vector3df scale=irr_meshNode->getScale()*IrrToNewton;//get scale info
matrix.makeIdentity();
vector3df pos=irr_meshNode->getPosition()*IrrToNewton;//get position info
matrix.setTranslation(pos);//set postion
NewtonCollisionSetScale(collision_map,scale.X,scale.Y,scale.Z);//set [b]collsion's[/b] scale, [b]not[/b] the body's scale
mapMesh=NewtonCreateBody(nWorld,collision_map,&matrix.pointer()[0]);
Well, some times the box would full through the mesh after several bounces, it seems that if the objects were too small for the mesh, it can easily go through it while intersecting.
BTW, what is the alternative function of NewtonSetWorldSize? This function seems has removed from newton 300, too.
-
Neo
-
- Posts: 127
- Joined: Fri May 11, 2012 12:29 pm
- Location: China,Sichuan
by Julio Jerez » Sun Jun 03, 2012 3:41 pm
I have not completed that continue collision yet. I will do that afte I get the editor in a more advace state.
for now you can just run at a fastr rate until teh CC is enable.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by pHySiQuE » Sun Jan 27, 2013 9:20 pm
I just came across a problem where spheres would not collide with a scaled collisiontree body. Is this supposed to be working, at the present? I've already created a workaround, so it's no big deal either way.
-
pHySiQuE
-
- Posts: 608
- Joined: Fri Sep 02, 2011 9:54 pm
by Julio Jerez » Mon Jan 28, 2013 6:37 am
it should work yes.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by pHySiQuE » Mon Jan 28, 2013 10:44 pm
I just tested and in our engine, calling NewtonCollisionSetScale on a collision tree has no effect.
It does work on other collision types. NewtonCollisionSetScale() must be called before the call to NewtonBodySetCollision().
-
pHySiQuE
-
- Posts: 608
- Joined: Fri Sep 02, 2011 9:54 pm
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 0 guests