Changing collision poly
by Chumpy · in Torque Game Builder · 05/12/2008 (7:42 pm) · 1 replies
Is it possible in TGB to change the collision polygon of a player character? In platformers, characters can often duck to avoid attacks, and the original Super Mario games had a lot of changes in size, but I haven't been able to find a way to implement that sort of thing in TGB.
How would I go about this?
How would I go about this?
About the author
Torque Owner Diogo Rios
you need to figure out the coords you need for the several states of your character and then change the collision poly list when the character state changes.
Our game has characters with 8 different positions/collisions so on the player datablock we define:
CollisionPolyListE = "-0.447 0.432 0.643 0.432";
CollisionPolyListO = "0.530 0.427 -0.643 0.417";
CollisionPolyListSO = "0.275 0.157 -0.358 0.555";
CollisionPolyListNO = "0.250 0.683 -0.314 0.344";
CollisionPolyListN = "-0.049 0.717 -0.049 0.417";
CollisionPolyListNE = "-0.177 0.673 0.344 0.334";
CollisionPolyListSE = "-0.246 0.118 0.368 0.570";
CollisionPolyListS = "0.044 0.049 0.044 0.678";
I then had to when i needed it to turn north do:
%this.CollisionPolyList = CollisionPolyListN;
hope it helps