GameSalad

Changing physics while game is running

LyboTechLyboTech Posts: 135
edited September 2015 in Working with GS (Mac)

I'm trying to change the physics of an actor while the game is running, I read in another post that this is not possible, so is there any way you can work around this limitation or is it simply not possible ?

Basically what I'm trying to do:

When overlaps with X
Change attribute "self.physics.movable to true"

Answers

  • SocksSocks London, UK.Posts: 12,459

    . . . what I need to do.

    What is it you are trying to do ?

  • @Socks said:
    . . . what I need to do.

    What is it you are trying to do ?

    Edited

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,860
    edited September 2015

    You can't change those physics attributes at runtime. What you can do is constrain the actors position and then release that constrain when the overlap and collide happens.

  • @Lost_Oasis_Games said:
    You can't change those physics attributes at runtime. What you can do is constrain the actors position and then release that constrain when the overlap and collide happens.

    I tried that earlier, resulting in other problems. Thanks for the input, but currently not working without very big workarounds. Anyone knows of other solutions ?

  • Update: I just created another collision actor so the original actor doesn't get involved. Thank for inputs!

Sign In or Register to comment.