How to re-use object collision
by Arden · in Torque Game Builder · 08/11/2010 (10:38 pm) · 2 replies
Hi folks,
I know how to create a specific collision in the Editor for an object, however I'm wondering how to instanciate an object with that specific collision from the script.
Must I clone a prototype object?
Any ideas?
Thanks
I know how to create a specific collision in the Editor for an object, however I'm wondering how to instanciate an object with that specific collision from the script.
Must I clone a prototype object?
Any ideas?
Thanks
#2
Thanks again William for your help.
08/12/2010 (3:48 am)
Awesome! I must say you are an active contributor to my threads :)Thanks again William for your help.
Associate William Lee Sims
Machine Code Games
Another is to set the class on the object and use the onAdd callback and set the CollisionPolyList.
function MyClass::onAdd( %this ) { %this.CollisionPolyList = "-1 1 1 1 1 -1 -1 -1"; }If you save your game with one of these objects, you can look at the level's .cs file and get the CollisionPolyList from that object. Then, back in the editor, go back and delete that object.