Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Collision Shape

novonovo Posts: 11Member
edited November 2011 in Working with GS (Mac)
Hey Guys:

I'm learning to program with gamesalad and I have one cuestion for you:
How can I do Gs use an irregular shape to collide an actor (PNG image) with another actor (PNG images with transparency)? I've seen in GS you can choose only rectangle or circle.

I have a ball and a triangle png images but I can't do a good collision. Any suggestion?

I'm doing something wrong .... right?


  • Braydon_SFXBraydon_SFX Posts: 8,981Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee
    edited November 2011
    Yeah, as RKS said, we do not have custom collision shapes yet, I really hope they get it our there though. It would make this a whole new world. :-)
  • novonovo Posts: 11Member
    what a shame! It would be helpful.

    I hope GS allow custom collision in the future.

    Thanks RKS and Braydon_SFX.
  • ozboybrianozboybrian Posts: 2,102PRO
    There is a way to do it, but it's my own little way that i'm not sure if other people use.
    You constrain invisible actors together to build the shape you want viola!
  • Braydon_SFXBraydon_SFX Posts: 8,981Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee
    @ozboybrian That might work if your building a small game. However, probably not the best idea to do that method if you are making an 18 MB game.
  • SnapFireSnapFire Posts: 361Member

    Also, rotation will not work properly if you do this.

    Actually, anyone know how to make rotation work with constraints? Would be good to know.
  • JohnPapiomitisJohnPapiomitis Posts: 6,256Member
    edited December 2011

    yes by getting the starting angle and using sin ans cos. might need to plug magnitude somewhere in there as well but not sure havent done this in a long time
  • SkyMapleSkyMaple Posts: 817Member

    Sounds kinda messy...
  • JohnPapiomitisJohnPapiomitis Posts: 6,256Member

    Just some trig.

    Search: DEMO_Wielding_Lightsaber in the new section of the gamesalad creator. Its a free demo that constrains a lightsaber to the player and has rotation working with sin and cos

This discussion has been closed.