45 Degrees? pie / 4 radians?

chosenonestudioschosenonestudios Member Posts: 1,714
edited November -1 in Working with GS (Mac)
Unfortunately I'm not sure how to spell pie... Hopefully its like that...

I was wondering how I would go about making objects collide / bounce off in 45 degree angles, I've been trying to wrap my head around this for awhile and cant seem to manage this. :/

If this is a simple solution, I'm very sorry for taking your time, but your help is very much appreciated nevertheless. Thanks again ;)

-Will

Comments

  • chosenonestudioschosenonestudios Member Posts: 1,714
    ??
  • chosenonestudioschosenonestudios Member Posts: 1,714
    ???
  • chosenonestudioschosenonestudios Member Posts: 1,714
    ????
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I think you scared people with TRIG!!!!!!!!!!

    AHHHHHHHHH!!!!!!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    What types of objects are colliding?

    You should be able to achieve everything with rules and the vectortoangle function.

    Gamesalad does not use radians, just degrees, which makes things easier. You most likely will not need to use Pi.
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Oh ok.. and I did spell pi wrong haha.. Thanks fmg, its just one object basically that collides with 4 walls and I need to make it bounce off in in 45 degree angles just with those 4 walls... Ok so I use vector to angle, that requires an x and a y so I'm not entirely sure how I would implement that, any suggestion?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Is the object that hits the walls only travelling in 45 degree diagonal angles? If so, when it hits a wall simply flip either its x or y.

    I have this working in the magnitude demo on my wall. Feel free to dig through it. Youll need two different wall actors, one for the sides and one for the top and bottom.
  • TrisTris Member Posts: 58
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273724587006606315588174881520920962829254091715364367892590360011330530548820466521384146951941511609
  • TrisTris Member Posts: 58
    That should be accurate enough :)
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Tris said:
    That should be accurate enough :)

    Thanks Tris :)

    Ty fmg, definitely will do !
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Oh wow, what an easy fix, I just had them flip flopped haha mixed up the x and y values.. Thanks fmg again, I appreciate it!

    If anybody else is looking for the answer... its right here :D

    http://gamesalad.com/game/play/31279
Sign In or Register to comment.