Help For collide with Some Math

MagoNicolasMagoNicolas Member, PRO Posts: 2,090
edited November -1 in Working with GS (Mac)
Hello, how are you?
I need some Help for a Collision That i want to made with MAth.
I Want to have a Collidable area like a Diagonal Rectangle. For This MEdusa.

image

How Can i Do it With NO extra actor constraining his position?

Thanks.

Comments

  • SkyMapleSkyMaple Member Posts: 817
    MagoNicolas said:
    Hello, how are you?
    I need some Help for a Collision That i want to made with MAth.
    I Want to have a Collidable area like a Diagonal Rectangle. For This MEdusa.

    image

    How Can i Do it With NO extra actor constraining his position?

    Thanks.

    You can't do this without having more than one actor. but what about a circular collision?
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    I Know you can do it, Actual collisions are made with math stuff, I use to code weird collision shapes in the past.

    Cheers.
  • SkyMapleSkyMaple Member Posts: 817
    MagoNicolas said:
    I Know you can do it, Actual collisions are made with math stuff, I use to code weird collision shapes in the past.

    Cheers.

    Really? With gamesalad?

    If any one else wants to chime in with an answer it would be greatly appreciated!
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    It would be tough but I imagine you could use magnitude to determine how close the the center a colliding object is and then based on some x and y positions you could simulate some sort of bounce but honestly I think you will be killing your game performance. If you have used math to make collision shapes before in GS then your prob gonna be better at it then most of us.

    I dont think your gonna have much good luck doing it with GS.

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    Menu #4 - Level Banners HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Thanks for Help, I Reedo image and make it Horizontal, then NONcollidle space are on top and bottom and thats very easy to code

    Cheers.
  • micksolomicksolo Member Posts: 264
    MagoNicolas said:
    Thanks for Help, I Reedo image and make it Horizontal, then NONcollidle space are on top and bottom and thats very easy to code

    Cheers.

    Could you give some more information about how you made the top and bottom not collide please? I'm very interested in this.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    You Must Have To "Record" some Y Attirbute.
    Then on the character you are nor recording Y, you create a rule like this:

    iF Recored Y greater than Self position Y - (Self Size Height / 2)- Half height of The character you are recording Y - Some Number of Pixels you don't want to collide, like 10 pixels
    AND
    iF Recored Y less than Self position Y + (Self Size Height / 2)+ Half height of The character you are recording Y + Some Number of Pixels you don't want to collide, like 10 pixels

    Its that easy :D

    Cheers.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    Oops Duplicate Post.
Sign In or Register to comment.