Drag Collision HELP!

JustTooSmexiJustTooSmexi Member Posts: 7
edited November -1 in Tech Support
I have a game where my actor has to touch another actor in order to get to the next level, with obstacles. One of the obstacles is a wall, but since my actor is being dragged it goes right though it and bounces off the other side, with collision turned on, someone please help! thanks (:

Comments

  • entersimonentersimon Member, PRO Posts: 273
    I'm going to assume by drag, you actually mean constrain. Drag is a physics property in GS. If I'm wrong in my assumption then disregard what I'm about to say.

    You can make a rule that says if your actor overlaps or collides with the actor of type wall, interpolate position to self.position x to self.position x - 5 (or whatever you want for the bounce effect.

    Then in the otherwise put the constrains you're using to "drag" the actor.

    Unfortunately it's not completely clear what the exact problem is, so if what I wrote doesn't fix it, write out a more detailed summary and either I or some other friendly GS user will be happy to help you out.

    Best of luck!

    :^)
  • JustTooSmexiJustTooSmexi Member Posts: 7
    Well im using constrain attribute, self.position x is equal to game.touches.touch 1.x and self.position y is equal to game.touches.touch 1.y which enables the player to drag the actor, but for some reason when they drag it, it goes right through another actor (a wall i made) thanks for the quick reply, I will try what you said thanks (:
Sign In or Register to comment.