Collision for transparent areas on an actor?
Hello all,
I was wondering if it was possible to make it so that when an actor collides with another, instead of colliding with the transparent area around the picture, collide with the picture itself. This bugs me when I do not have a rectangular picture.
Thanks,
FLPApps
I was wondering if it was possible to make it so that when an actor collides with another, instead of colliding with the transparent area around the picture, collide with the picture itself. This bugs me when I do not have a rectangular picture.
Thanks,
FLPApps
Best Answer
-
DreamLab Posts: 2,127
At the moment, custom collisions are not available. Hopefully sometime down the road they will be. The best option is either(if it's a stationary object) draw actors around each side(for example, a triangle) and have collide rules on THOSE actors, but if you are talking about a character or moving object, there's not much you can do.
Answers
or as one does in other gameEngines …
you create a sensor or collide actor …
sensors/colliders are generally smaller than the actor they are attached
in GS …
-add new actor
-add two constrainAttributes to it …
-drag an instance to the scene where needed and resize appropriately
-unlock its behaviors
-edit the constrainAttributes …one self.X and one self.Y to the X,Y of the actor
(Current scene > layers > correctLayer > correctActor > Position > X … Y)
-change Graphics: visible to false (uncheck) after it works
and, of course that same prototype can be used throughout the game