Game Development Community

Items not getting updated while in motion

by Cinder Games · in Torque Game Engine · 07/10/2006 (10:03 pm) · 7 replies

This is using a stock exe. I can load up the stronghold map, select an item, uncheck static, and behold what happens when i move it.

The object doesn't update it's rendered position until the item stops moving.



ramensama.dyndns.org:8000/temp/item-active.avi

Movie of the bug in action.



www.garagegames.com/mg/forums/result.thread.php?qt=26039
This thread sorta talks about something similiar, but the code changes related to the at rest stuff is present in my source code.


Is this something that has been fixed with the latest head perhaps?

#1
07/10/2006 (10:21 pm)
It's clearly an issue with setting the position mask.
But the updatePOS functions is pretty picky about deciding to update the client



// Only update the client if we hit a non-static shape or
      // if this is our final rest pos.
      if (nonStatic || mAtRest)
         setMaskBits(PositionMask);
   }
#2
07/11/2006 (2:51 pm)
No takers?
#3
07/11/2006 (3:07 pm)
I have seen this behavior, too. I was going to post the same question but haven't gotten around to it.

I'd really like to know, because a solution would be very useful for me.
#4
07/11/2006 (3:10 pm)
Well i can provide a solution.....


you can just add in

if (!mAtRest)
setMaskBits(PositionMask);


somewhere and it'll behave right. Probably can add this after the code i posted before.

But i'm sure there's a better way around this. since i'm unfamiliar with the item class i was looking for some expert insight.
#5
07/11/2006 (3:15 pm)
Hmm, I see. I suppose you could also take out the mAtRest part of the code above, too. The question is, why wait until the object is at rest to update the client? Is it a speed issue?
#6
07/11/2006 (3:28 pm)
It seems to have similiar collision checks as a player, but it's doing the checks regardless... only the fact it's not updating the client positions.... So i dunno.

To me, any time the item is in motion... it needs to be updated, so i'm gonna probably just remove that first bit of code and use that other code.
#7
07/11/2006 (3:30 pm)
Interesting...I have to give that a try as well.