Detecting World Collisions for object wrapping
by Erik Yuzwa · in Torque Game Builder · 02/23/2006 (1:50 am) · 2 replies
Hi everyone,
I've spent some time going through the documentation as well as these forums, but I can't seem to get my world collision working properly.
All I'm trying to do is detect if the player has hit the world boundary, and if so, wrap around to the opposite edge.
I've tried playing with the setCollisionPolyCustom of the player object, but I'm fairly certain this is used to define a custom bounding box around the player object, not meant for the world itself.
Both my player and asteroid objects are floating around on layer 15. Do I need to then create a dummy "world box" object that is the same dimensions as my game world and set to the same layer?
Or am I barking up the wrong tree? Is it a feature of the background tilelayer that I can enable/disable?
I do apologize for the n00b questions. I've figured out quite a bit in the past few hours, but I'm stuck on this (I'm sure) easy issue...
thanks!
I've spent some time going through the documentation as well as these forums, but I can't seem to get my world collision working properly.
All I'm trying to do is detect if the player has hit the world boundary, and if so, wrap around to the opposite edge.
I've tried playing with the setCollisionPolyCustom of the player object, but I'm fairly certain this is used to define a custom bounding box around the player object, not meant for the world itself.
Both my player and asteroid objects are floating around on layer 15. Do I need to then create a dummy "world box" object that is the same dimensions as my game world and set to the same layer?
Or am I barking up the wrong tree? Is it a feature of the background tilelayer that I can enable/disable?
I do apologize for the n00b questions. I've figured out quite a bit in the past few hours, but I'm stuck on this (I'm sure) easy issue...
thanks!
About the author
multi-talented game and web developer based in the glacial ice-caps of Calgary, Alberta. I'm versed in C++, and trying out Torque Game Builder Pro. I hope to get to know you, drop me a line and let's chat.
#2
That seems to have really helped things out.
Other commitments are messing with my dev time on this, but about the only thing I have left to get working smoothly is the rotation, acceleration portion of your ship.
sweet!
02/26/2006 (9:07 am)
Awesome thanks Jason.That seems to have really helped things out.
Other commitments are messing with my dev time on this, but about the only thing I have left to get working smoothly is the rotation, acceleration portion of your ship.
sweet!
Torque Owner Jason McIntosh