Multiple collsion polys
by Miguel Angel Cortes Sosa · in Torque Game Builder · 04/30/2006 (9:24 am) · 2 replies
Hell all,
I haven't been able to find information on how to set multiple polys for a sprite image (usefull for fighting games or to have a better collision siloutte for a complex sprite)
Can anyone point me in the right direction for this?
Thanks a lot.
Hagen
I haven't been able to find information on how to set multiple polys for a sprite image (usefull for fighting games or to have a better collision siloutte for a complex sprite)
Can anyone point me in the right direction for this?
Thanks a lot.
Hagen
About the author
#2
I think implementing multiple polys or multple collision circles/boxes woud be easier (or maybe not) but definetly have better performance thand doing pixel bassed collition:
When I was developing my own engine and get to this point, I reached to the above statement since
locking and reading back the texture for collision checking was to expensive processor-wise, plus since I could have all displayed textures been affected by their own scalar vector, doing the checking collision between to textures with different scales seemed just too complicated and expensive.
04/30/2006 (6:27 pm)
Yes that was the alternative...I think implementing multiple polys or multple collision circles/boxes woud be easier (or maybe not) but definetly have better performance thand doing pixel bassed collition:
When I was developing my own engine and get to this point, I reached to the above statement since
locking and reading back the texture for collision checking was to expensive processor-wise, plus since I could have all displayed textures been affected by their own scalar vector, doing the checking collision between to textures with different scales seemed just too complicated and expensive.
Torque Owner Philip Mansfield
Default Studio Name
You can however, mount some dummy objects to your sprites and set polys on those. A little more cumbersome, and you'd need to keep track of where they should be mounted as your sprites animate, but it's certainly doable.
The other option I'd like to see is a pixel based collision method rather than poly based. Then you wouldn't need to worry about polys at all.