Custom collision shape?
Teeb
Member Posts: 5
Is it possible to define a custom collision shape for an actor?
It's all very well having a circle and a square available, but I have an irregularly shaped actor and being a confined game in terms of space, I want the collision shape to reflect the real shape of the actor.
For instance, let's say my main actor is a triangle - what about the space on the two sides? I don't want the object to collide in that space, even if the image transparency exists there.
Is there any way of doing this? I saw someone suggest that it's possible to group together certain actors and have them all with square or circle collision shapes in order to 'construct' the main actor. My game is extremely simple and so I have some leeway. So this would be possible I suppose, but it sounds messy and I'd rather a different option.
It's all very well having a circle and a square available, but I have an irregularly shaped actor and being a confined game in terms of space, I want the collision shape to reflect the real shape of the actor.
For instance, let's say my main actor is a triangle - what about the space on the two sides? I don't want the object to collide in that space, even if the image transparency exists there.
Is there any way of doing this? I saw someone suggest that it's possible to group together certain actors and have them all with square or circle collision shapes in order to 'construct' the main actor. My game is extremely simple and so I have some leeway. So this would be possible I suppose, but it sounds messy and I'd rather a different option.
Comments
The workaround you mentioned is really the only way to simulate non-zero alpha collision only at the moment...
----------------------------------------------
http://davidgriffinapps.co.uk/
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Yeah.. like say I had a triangle shaped actor, I could just make a series of small circles surrounding it as the 'boundaries'?
It would be much more efficient to simply have three long thin rectangles along each edge.
Cheers
bump