Game Development Community

Don't seem able to set a collision polygon

by James Randall · in Torque Game Builder · 02/21/2006 (10:17 am) · 3 replies

I'm calling this on a scene object:

%object.setCollisionPolyCustom(3, "-1 -1 1 -1 -1 1");

and expecting it to set a triangular collision polygon for the object but it seems to do nothing at all. I've tried different numbers of vertices and vertices all over the shop but it just doesen't seem to make any difference. I always end up with a rectangular collision box.

Am I missing something? Do I need to call something else first?

Any help would be greatly appreciated as I've been bashing my head for a while now (which makes me think I *am* missing something!).

Thanks,

James

#1
02/21/2006 (2:10 pm)
Ignore me. I was being a complete idiot. I'd got the co-ordinates the wrong way round so the triangle was where I didn't expect.

Bonehead!
#2
02/21/2006 (6:50 pm)
Keep in mind that with the new level editor you'll be able to draw the collision polys on top of the sprite--much easier than calculating coordinates!
#3
02/22/2006 (2:04 am)
Sounds great :)