Problems with actor , help !

ThaniThani Member Posts: 128
edited November -1 in Working with GS (Mac)
Ok I'm working on my game at the moment , and want to let my actor gets destroyed when it collides or overlaps with another actor . But my actor will get destroyed before hitting the actor , because it hits the scaling bar ( the bar that sizes the actor or w/e its called ) .
So how can I avoid this , so my actor will get destroyed when it collides with the actual actor and not the sliding bar ?

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    I've no idea what you mean by 'scaling bar', other than you might be making your actor bigger.

    Is that it?

    Regardless, you could make a second actor (let's call him 'shadow') and constrain its X and Y position to that of the original actor (let's call him 'player').

    Then, instead of checking if the enemy collides with the player actor, check if the enemy collides with the shadow actor.

    Hope that helps!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • gariantrollgariantroll Member Posts: 219
    That is a great idea and you beat me to it.
  • ThaniThani Member Posts: 128

    This is what I mean . I'm not even touching the circle or hoop .

    Sorry about the bad quality , i just downloaded it to show it to you guys .
  • simo103simo103 Member, PRO Posts: 1,331
    you circle actor has too much transparent part firstly. Remake the images with the transparent border hitting all sides of the circle. Then select collision shape - circle in the physics part of the actor.
  • quantumsheepquantumsheep Member Posts: 8,188
    Well, you can see at the end that the circle is smaller than the actor.

    In the graphic for the circle, crop it so that the circle exactly touches the edges.

    Then in GameSalad, double tap your hoop actor and look at the inspector on the left hand side (where all the info is, e.g. size, position etc)

    Scroll down to 'Physics' and change the collision shape from rectangle to 'circle'

    That should do it.

    Hope it helps!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • quantumsheepquantumsheep Member Posts: 8,188
    @Simo

    /hi5

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • simo103simo103 Member, PRO Posts: 1,331
    @quantum /hi5

    right back at ya!

    (always happy to have my suggestions verified by 'experienced' members ... since I'm still new and wingin' it a bit)
Sign In or Register to comment.