World Limit Problem?
by Gagan · in Torque X 2D · 08/12/2009 (9:39 am) · 3 replies
hi
I have an image showing top view of a city having buildings surrounded by tracks.I need my player to move on these tracks only.
How can it be done??
Can an object has more than one world limit??
kindly suggest...thanks
I have an image showing top view of a city having buildings surrounded by tracks.I need my player to move on these tracks only.
How can it be done??
Can an object has more than one world limit??
kindly suggest...thanks
#2
If your buildings are not always near the tracks, then you could add blank scene objects and lay them out where you you don't want your player to go and then set clamp collisions on them with the player.
08/12/2009 (1:23 pm)
If the tracks are always in between the building then make a Clamp collision with your player and the building.If your buildings are not always near the tracks, then you could add blank scene objects and lay them out where you you don't want your player to go and then set clamp collisions on them with the player.
#3
thanks
08/12/2009 (4:19 pm)
i tested this onCollision() function..this proved out to be beneficial...thanks
Torque Owner Steve Wigmore
Default Studio Name
In theory, you could code in several world limit coordinates to be swapped in and out using code. I don't know for a fact if world limits can be set during run time or not.
Or, you could block the character in place, with the exception of the tracks using collision objects and have the chr stop when he reaches one of the objects. Leave space between the collision object for the tracks.
That's all I got right now, Anyone else?