[BUG?]BloodyMess 1.5.4 & moveGlobalPosition

al2950

21-06-2009 18:37:14

Hi,

In my scene i currently have a kinematic actor which is moving in a horizontal direction and a set of normal actors which are dropped on top of it. The problem is that that actors that are dropped on it do not move with the kinematic actor and act if they have been dropped on to a stationary object. I am not sure why this happens or if i have misunderstood something, but i have assumed it is because there is no friction between the two actors.

Hope that makes sense!

Any help would be appreciated

Cheers

Angus

*EDIT, Changed title so people who have similar problem can find solution!

betajaen

21-06-2009 18:53:03

I'm not totally sure if frictional forces are applied to actors on top of normal kinematic actors; due to the way the behave. The way I understand how they work, I imagine they do, but with your problem it seems they don't.

But some pictures or a video will help.

Thinginator

22-06-2009 00:42:54

I had the same issue. I think the issue is that the 'moveGlobalPosition(NxOgre::Real3)' function in the KinematicActor class calls this function eventually:

extern inline void moveGlobalPosition(const Real3& r3, NxActor* actor)
{
static NxVec3 global_position;
global_position.x = r3.x;
global_position.y = r3.y;
global_position.z = r3.z;
actor->setGlobalPosition(global_position);
}

I don't think you're suppose to call actor->setGlobalPosition(); for kinematic actors(From what i've read anyway) instead change ' actor->setGlobalPosition(global_position);' to 'actor->moveGlobalPosition(global_position);'. This fixed it for me anyway. I'm not sure if this will break something else though. It's in the file NxOgreRigidBodyFunctions.cpp of the nxogre project.

There's stuff about it in the Physx documentation if you want to read more.

al2950

22-06-2009 09:33:33

Cheers Thinginator That seems to have fixed it, :D I am now getting some jittering from the actors on top of the kinematic actor but i think that might be something to do with my update order.

Looking at the code in NxOgreRigidBodyFunctions.cpp it seems that there might be a few copy and paste errors :? .

Betajaen is this a bug or is there a good reason for this!?