Alright, I have to call out this function because it's just not working for me. I always end up with my player being shot into orbit using this.
My "Avatar" BodyShape object has one of two child physics definitions active at any one time. Either a standing or a jumping collision.
I've tried this many different ways, but when I call world.doOutsideOf.... target.b2Body.SetTranform( new V2( targetDO.x, targetDO.y ), 0 ); I never get the "relocation" effect I'd like.
Does it have something to do with the parented nature of my physics stuff? We're trying to simulate an elevator moving the player in the zone from one point to another. We're doing a lame workaround right now where the player basically warps to another zone, sits in darkness for a moment and then warps back to the other checkpoint.
Thanks in advance, 🙂
[EDIT]: Here are the values I'm tracing out when I call this:
Avatar position: -1565.1 _ 677.5 (tracing this value out every updateBodyMatrixSimple while I'm debugging this issue)
Target DisplayObject position: -1378.85 _ 588.4
Next Avatar position in updateBodyMatrixSimple: -82736.95 _ 35297.95 (Burton sneers at the computer at this very moment)
My "Avatar" BodyShape object has one of two child physics definitions active at any one time. Either a standing or a jumping collision.
I've tried this many different ways, but when I call world.doOutsideOf.... target.b2Body.SetTranform( new V2( targetDO.x, targetDO.y ), 0 ); I never get the "relocation" effect I'd like.
Does it have something to do with the parented nature of my physics stuff? We're trying to simulate an elevator moving the player in the zone from one point to another. We're doing a lame workaround right now where the player basically warps to another zone, sits in darkness for a moment and then warps back to the other checkpoint.
Thanks in advance, 🙂
[EDIT]: Here are the values I'm tracing out when I call this:
Avatar position: -1565.1 _ 677.5 (tracing this value out every updateBodyMatrixSimple while I'm debugging this issue)
Target DisplayObject position: -1378.85 _ 588.4
Next Avatar position in updateBodyMatrixSimple: -82736.95 _ 35297.95 (Burton sneers at the computer at this very moment)