it is a very simple dynamicsworld(setGravity(0,0,-10)) with just on dynamic rigidbody, at the position (0,0,100),
i call the stepSimulation,then print out the position of the rigidbody. they all are "nan".
can anyone give me some clue that cause this problem?
thx..
is there any suggestion for a "nan" problem?
-
- Posts: 229
- Joined: Sun Sep 30, 2007 7:58 am
Re: is there any suggestion for a "nan" problem?
Does this happen after just one stepSimulation or after several steps?zzcn wrote:it is a very simple dynamicsworld(setGravity(0,0,-10)) with just on dynamic rigidbody, at the position (0,0,100),
i call the stepSimulation,then print out the position of the rigidbody. they all are "nan".
can anyone give me some clue that cause this problem?
thx..
Do the bodies rest on a ground or do they fall into infinity?
-
- Posts: 20
- Joined: Tue Nov 04, 2008 1:50 pm
Re: is there any suggestion for a "nan" problem?
oh..there is only one obejct, and it do falls into the infinity...
i should add a ground into it and try again.
thx a lot..
kun
i should add a ground into it and try again.
thx a lot..
kun
-
- Posts: 20
- Joined: Tue Nov 04, 2008 1:50 pm
Re: is there any suggestion for a "nan" problem?
i added a "ground"(static btRigidBody) into the world.
but after the stepSimulation(1.f/60.f, 60) the dynamics object's position is still "nan"
is there still any other possible clue?
thx. for any suggestions.
kun
but after the stepSimulation(1.f/60.f, 60) the dynamics object's position is still "nan"
is there still any other possible clue?
thx. for any suggestions.
kun
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: is there any suggestion for a "nan" problem?
Is the NAN already there before adding the object to the world, or before stepSimulation?
Did you initialize the world transform correctly? Do you get the NAN from the rigidbody or motionState?
Can you reproduce this in any of the Bullet demos?
Thanks,
Erwin
Did you initialize the world transform correctly? Do you get the NAN from the rigidbody or motionState?
Can you reproduce this in any of the Bullet demos?
Thanks,
Erwin
-
- Posts: 20
- Joined: Tue Nov 04, 2008 1:50 pm
Re: is there any suggestion for a "nan" problem?
i checked the position before the stepSimulation from the motionstate, it's still (0,0,100)
after simulation it becomes (nan, nan, nan)
i am doing something with bullet, that runs on different computer, works with a game engine. I write some test program to check out my idea.
Maybe i did something wrong with the network communication part that causes this problem, I will try to find it out and replay it here.
thx again.
kun
after simulation it becomes (nan, nan, nan)
i am doing something with bullet, that runs on different computer, works with a game engine. I write some test program to check out my idea.
Maybe i did something wrong with the network communication part that causes this problem, I will try to find it out and replay it here.
thx again.
kun
-
- Posts: 20
- Joined: Tue Nov 04, 2008 1:50 pm
Re: is there any suggestion for a "nan" problem?
ye...i found the reason, i did something wrong here, set the basis matrix in the btTransform not correctly...
sorry and thx anyway.
i still have one small question, need some help here.
i have two dynamicsworld, one at the server side, do the really physic computing, another at the client site, which just works more like a proxy, with game engine together. after the simulation, server send the following rigidbody's data back:
linearvelocity
angularvelocity
basis Matrix
origin
is these info enough to update the rigidbody on the client side? any help will be appreciated
thx!
kun
sorry and thx anyway.
i still have one small question, need some help here.
i have two dynamicsworld, one at the server side, do the really physic computing, another at the client site, which just works more like a proxy, with game engine together. after the simulation, server send the following rigidbody's data back:
linearvelocity
angularvelocity
basis Matrix
origin
is these info enough to update the rigidbody on the client side? any help will be appreciated
thx!
kun