limdor
11-03-2008 11:36:55
Hi people, I try to create a fixed joint between two cubs like two bricks but when I create a fixed joint actors joint with springs.
Does any people know how to joint to cubs like two bricks?
Thank you
betajaen
11-03-2008 11:49:46
brick1->joinWith(brick2);
limdor
11-03-2008 12:01:14
Well, I do the same with createFixedJoint but I don't know wich parameter I should put because if I do this the house is like a flubber.
betajaen
11-03-2008 12:06:32
There isn't any parameters with fixedJoint.
If you want the house to be completely solid, and no destruction of it. Then just use all the shapes for the house in a single Actor.
limdor
11-03-2008 12:07:28
I want a solid house but i want destruct it
betajaen
11-03-2008 12:08:47
Then fixedJoint with a high force and torque.
limdor
11-03-2008 12:14:52
Thank you, but if I use this the house is like gelatin, I will search more and I will post a solution.
betajaen
11-03-2008 12:19:02
It may be down to the mass/weight of the house. But I've built a destructible house in NxOgre before, and I built in the same way FarCry did - Sheets of wood with joists, no bricks. It was fairly stable plonked down, and even stood up to a fall from a small height.
limdor
11-03-2008 16:58:30
I have used the same implementation in training programs with ageia and it works but with NxOgre doesn't work. Is it a bug? Have anybody done a construction without seems gelatin?
betajaen
11-03-2008 16:59:29
limdor PM'd me asking if I could post my code for the shed. I'll post it here, so everyone can see it.
http://pastie.caboo.se/164465
Use "cube.1m.mesh" scaled based on the Shape if you want to try it out in Cake.
How did I make the shed without pulling my hair out, you may ask? I modelled it in a 3D modeler using primitives, then copied down the orientations and positions onto paper. It also helps if you reuse things.
dbrock
11-03-2008 17:39:14
limdor PM'd me asking if I could post my code for the shed. I'll post it here, so everyone can see it.
http://pastie.caboo.se/164465
Use "cube.1m.mesh" scaled based on the Shape if you want to try it out in Cake.
How did I make the shed without pulling my hair out, you may ask? I modelled it in a 3D modeler using primitives, then copied down the orientations and positions onto paper. It also helps if you reuse things.
Booo, this link is filtered by my school. "social networking" :/
limdor
11-03-2008 22:24:02
Thank you, a very good and complete example, I try it tomorrow. Now it's too late.
Good night
limdor
14-03-2008 09:34:23
I have just tried this example but it's like gelatin.
Wich version of NxOgre do you use? Bledding is diferent in joints? I use 0.9-38
betajaen
14-03-2008 10:18:34
As far as I can tell. The Joint system in "Bleeding" is exactly the same as in 0.9. So that code should work for you.
limdor
14-03-2008 12:40:50
I have this code and the house is like a flubber, which is the error, i don't know what happens
Body *cos1, *cos2;
int maxForce = 30;
int maxTorque = 30;
JointParams param;
param.setToDefault();
param.mBreakableMaxForce = 30;
FixedJoint *joint;
for(x=0; x<N; x++)
{
for(y=0; y<N; y++)
{
for(z=0; z<N; z++)
{
if(plantilla[x][y][z])
{
if(z>0)
{
if(plantilla[x][y][z-1])
{
cos1 = caseta[x][y][z];
cos2 = caseta[x][y][z-1];
joint = mScene->createFixedJoint(cos1,cos2,param);
}
}
if(y>0)
{
if(plantilla[x][y-1][z])
{
cos1 = caseta[x][y][z];
cos2 = caseta[x][y-1][z];
mScene->createFixedJoint(cos1,cos2,param);
}
}
if(x>0)
{
if(plantilla[x-1][y][z])
{
cos1 = caseta[x][y][z];
cos2 = caseta[x-1][y][z];
mScene->createFixedJoint(cos1,cos2,param);
}
}
}
}
}
}
limdor
03-04-2008 17:16:26
I try it and don't work, could you give me the rest of the code to see if I do somthing wrong in sdk inicialization please?
limdor
07-04-2008 10:37:28
Could you give me the InitNx code please? I am very block
limdor
07-04-2008 11:13:43
You gime me this kind of code but don't work well and it's like a floppy too.
I think the error could be in the sdk inicialisation. Could you give me the rest of code please?
limdor PM'd me asking if I could post my code for the shed. I'll post it here, so everyone can see it.
http://pastie.caboo.se/164465
Use "cube.1m.mesh" scaled based on the Shape if you want to try it out in Cake.
How did I make the shed without pulling my hair out, you may ask? I modelled it in a 3D modeler using primitives, then copied down the orientations and positions onto paper. It also helps if you reuse things.
betajaen
07-04-2008 11:16:36
That IS the entire code. It runs in Cake and there is nothing special about the initialisation.
If you want to make it less "floppy" increase the damping on the actors and/or joints.
limdor
07-04-2008 11:20:56
I know how to increase damping in actor but how can I increese damping in joints?
Thank you very much, soon I solve the problem.
When I finish my project I upload some videos.