collision utilizando mouse position

SoAGAMESSoAGAMES Member Posts: 81
edited January 2017 in Working with GS (Mac)

Hi guys
My question is the following creates an actor who moves with a system of drawing and movement using these behaviors, what I want to do is that it collides with another actor and does not transpose it

Image and video hosting by TinyPic

Image and video hosting by TinyPic

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Can you give an example (a sketch would be best) of what you want? I don't understand what it means to collide but not transpose.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SoAGAMESSoAGAMES Member Posts: 81

    @tatiang said:
    Can you give an example (a sketch would be best) of what you want? I don't understand what it means to collide but not transpose.

    That as my actor moves with the mouse does not collide with other actors

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    When an actor moves in GameSalad, it does NOT collide with other actors. That is, unless you tell it to.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SoAGAMESSoAGAMES Member Posts: 81
    edited January 2017

    @tatiang said:
    When an actor moves in GameSalad, it does NOT collide with other actors. That is, unless you tell it to.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @SoAGAMES said:

    I explained, with the behaviors that appear above I made my actor move when drawing a line on the screen that I need that coluque that collision with an actor that calls platform but as I use the mouse position function (x, y) to Colosinar With The platform of the actor crosses it

    I'm really sorry but I don't understand that. It sounds like you're dragging an actor on the scene and wanting it to not collide with a platform actor. Are you using a Collide behavior? Do you have a rule that checks collision? What does that look like?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SoAGAMESSoAGAMES Member Posts: 81

    @tatiang said:

    @SoAGAMES said:

    I explained, with the behaviors that appear above I made my actor move when drawing a line on the screen that I need that coluque that collision with an actor that calls platform but as I use the mouse position function (x, y) to Colosinar With The platform of the actor crosses it

    I'm really sorry but I don't understand that. It sounds like you're dragging an actor on the scene and wanting it to not collide with a platform actor. Are you using a Collide behavior? Do you have a rule that checks collision? What does that look like?

  • ToqueToque Member Posts: 1,187

    I'm really sorry but I don't understand that. It sounds like you're dragging an actor on the scene and wanting it to not collide with a platform actor. Are you using a Collide behavior? Do you have a rule that checks collision? What does that look like?

    I think he wants it to collide with the wall actor but done quickly it goes through.

    I think when I did this in my game I used the constrain behaviour. I remember it being a bit fussy to stop my player from going off screen or detect collide when moving very quickly with the drag mechanic.

    Rule. If self position x =< 50
    Constrain postion to 51.

    this would keep it from going left of 50 X.

    Of course you can change 50 to whatever you want.

    If I remember that worked. Easy to try.

  • SoAGAMESSoAGAMES Member Posts: 81
    edited January 2017

    @uptimistik said:
    @SoAGAMES mi pana ya se q estas buscando. Aquí está: http://gshelper.com/product/constrain-to-mouse-and-keep-collision-gamesalad/

    Si necesitas más ayuda me avisas

    Gracias amigo con gusto, veo que en la plantilla utilizas la velocidad lineal y yo utiliza interpolate como haria en ese caso

  • SoAGAMESSoAGAMES Member Posts: 81

    @SoAGAMES said:

    @uptimistik said:
    @SoAGAMES mi pana ya se q estas buscando. Aquí está: http://gshelper.com/product/constrain-to-mouse-and-keep-collision-gamesalad/

    Si necesitas más ayuda me avisas

    Thanks friend with pleasure, I see in the template that uses linear velocity and I use interpolate as I would in this case

  • ToqueToque Member Posts: 1,187

    Thanks friend with pleasure, I see in the template that uses linear velocity and I use interpolate as I would in this case

    >

    Yes interpolating to move an actor will have problems detecting a collision.

Sign In or Register to comment.