Changing an actor's collision type on the fly...

delorianhayzedelorianhayze Member Posts: 55
edited November -1 in Working with GS (Mac)
Hey all!
I'm new to GameSalad so please forgive my "novice-ness" (if that's even a word- which it's not)...
Anyways I have an actor that needs to have both rectangle and circular collision. Meaning that the majority of the time the actor will have rectangle collision, BUT, when the user taps a button the actor suddenly turns into circular collision (and then back again of course).
My gut says it has something to do with destroying and spawning the actor seamlessly. But while the character may look the same, it's really two different actors with two different collision styles.
Any thoughts? And maybe my suggestion is right, but I have no idea how to actually do this properly.
Any suggestions would be so helpful, thanks!
DH

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    You could make 2 identical actors and move the one not needed off the scene maybe with a boolean called "switch" or you could keep the one actor and make 2 other mask actors (invisible) one with rectangle other with circle for collision and swap them with a boolean.

    Hope this helps.

    Darren.

    image
  • delorianhayzedelorianhayze Member Posts: 55
    Thanks, pretty great ideas!
    When you say have one as an invisible actor and switch with a boolean- how would you exactly do that? Is that the idea of spawning and destroying? And how can I connect the two actors together? If they have two different collision types, how do I ensure they don't move away from each other at a time of a collision?
    Thanks again! Much abliged!
    DH
  • UtopianGamesUtopianGames Member Posts: 5,692
    Made a video below, hope it makes sense.

    I would have the movement controls in the hero and collision in the other 2 actors.



    Darren.
  • delorianhayzedelorianhayze Member Posts: 55
    WHAT?! You made a video?! Man thank you so much! That's awfully kind of you! Hopefully one day when I get better at this whole GS thing I'll be able to return the favor. Many many thanks again!
  • UtopianGamesUtopianGames Member Posts: 5,692
    NP, glad i could help.

    Best of luck with your game.

    image
Sign In or Register to comment.