[ODE] dBodySetPosition - locked space?

Chris Ledwith cledwith at d-a-s.com
Tue Apr 4 11:50:45 MST 2006


Jean-Sebastien Guay wrote:
> Hello,
>
> In my game, when the player "dies", I want to move him back to the starting
> point. To do that, I move the graphical object, then call dBodySetPosition to
> move the associated rigid body object to the same place. However, at that call,
> I get an ODE internal error message box saying "invalid operation for locked
> space".
>
> What's happening? I didn't even know I had locked the space... Can I unlock it?
> I see no reference to this in the user guide.
>
>   
You are probably trying to move the geom from within your near-phase 
collision callback (or a callee of that function). The space is locked 
at this time because collision is still being processed.

Remember that the callback is called for each pair of potentially 
colliding geoms (a total of n pairs). So at the time you are trying to 
move this geom, you might be on collision test for the kth pair, where k 
is less than n, and there are still some pair tests left to go (n - k to 
be exact). All geoms should stay exactly where they are until all the 
tests are completed. That's why the space is locked.

-C


> Thanks in advance,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay     jean-sebastien.guay at polymtl.ca
>                          http://whitestar02.webhop.org
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>   



More information about the ODE mailing list