Game Development Community

World Limit Wrap

by Nicolai Dutka · in Torque Game Engine · 09/16/2007 (4:19 pm) · 1 replies

I know I saw "World Limit Wrap" in TGB which sets your player to the opposite end of the world one they reach the limit which simulates "world wrapping".

I am wondering if there is a simple checkbox option to make this work in TGE as well. If not, how would I implement such behaviors?

#1
09/16/2007 (8:32 pm)
Check the object's position in its processTick using getTransform(), and if it's greater/lesser than update the position to wrapped position. You might have to call the object's setPosition, depending on which particular class you're modifying, to get proper networking behavior.