Triangle Actor Collision Behavior

MaestroKaizersMaestroKaizers Member Posts: 6
edited January 2012 in Working with GS (Mac)
Hi there, in my game i have a triangle shaped actor, but my actor is shaped and behaves as a square when colliding with other objects. Due to this, it does not look realistic when my actor collides with other objects, because it does not really collide with the actual picture (not well explained) :P

Is there any way i can make my character behave like a triangle when colliding with other objects??
Someone please help ! ;)
Thx

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    the only collision shapes gamesalad currently has is square's or circle's.

    Youll have to make a triangle out of rectangle actors and have those act as the collisions

    cheers
  • MaestroKaizersMaestroKaizers Member Posts: 6
    Okay, thanks for responding ;)
    Is it possible to make serval rectangle actors and kind of merge these together as one actor?
    If this is possible, how do i do it??
  • tutysestutyses Member Posts: 134
    i guess you could just constrain the rectangles to the triangle position
  • CloudsClouds Member Posts: 1,599
    Even if you do manage to constrain three rectangles together to make a triangle then this new composite object won't be able to bounce around the scene naturally as it won't be able to rotate as a single object. You could in theory do it, but the maths woud be mindboggingly complex.
  • tutysestutyses Member Posts: 134
    i meant to use the mini rectangles to do the colliding thing so i wont look like the other actors collide with nothing
  • CloudsClouds Member Posts: 1,599
    edited January 2012
    @tutyses

    "i meant to use the mini rectangles to do the colliding thing so i wont look like the other actors collide with nothing"

    The idea of building a composite collision shape is really only practicable for static objects or objects that do not rotate.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Here is a example of the formulas involved in constraining moving/rotating actors:
    http://www.mediafire.com/?fdwccdw7cl0pf30

    You can also use the mouse to drag.

    This is really only a partial solution though. Constraining actors x/y positions overrides GameSalad's physics engine. To really get it to work like you want, you would need to use these formulas but not with constrain behaviors.

    RThurman
  • CloudsClouds Member Posts: 1,599
    Here's a test of a rotating triangle I did for someone last week, the arrow keys on your keyboard move the white ball.

    http://www.mediafire.com/?gaa2846cz2j8agx
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    edited January 2012
    @Tynan
    Any thoughts on how to get the three sides to react to objects? As your demo shows, objects can collide with constrained actors. But constrained actors cannot collide and/or bounce off of other objects. (This is really the same question you had several days ago with your 'hammer' example, I believe.)

    RThurman
  • CloudsClouds Member Posts: 1,599
    @RThurman

    Yep, same question, not sure there is a workable answer to be honest.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @Tynan
    So far I would agree. There are some work arounds, but they are not for the faint of heart, and the results are not all that great. GameSalad really needs a joint system to do this well.
Sign In or Register to comment.