Collision for transparent areas on an actor?

FLPAppsFLPApps Member Posts: 34
edited March 2012 in Working with GS (Mac)
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

Best Answer

  • DreamLabDreamLab Posts: 2,127
    Accepted Answer
    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

  • MotherHooseMotherHoose Member Posts: 2,456
    if the transparent pixel are on the corners … change Physics: Collision Shape to Circle

    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

    image MH
Sign In or Register to comment.