0 Favourites

Something Strange with "Is in touch" and solid objets

  • I don ´t understand what happen :

    For my test, I´ve a simple layout with 5/7 objects (simples rectangles 120 width 25 height) and put them in a family with behaviors (solid and physics), I select immovable yes and colisions enabled yes and my player is a circle with behavior physics. Very simple.

    And I put a event Touch with "Is a touch" and action for move my player. The player move fine. All correct. I can go up, down, left, right.

    But when the event touch is true the player cross over the rectangles (he doesn´t respect they are solid objects) .

    When I release button mouse, the player can´t cross the rectangles, physics work, and he respect again condition of object solid.

    Seem the player doen´t recognize the solid object(rectangles) when I push my mouse button for active the event, because when I release again the button, The player respect all the "solid" rectangles and I can´t cross over them.

    Why? Thanks.

  • What is the exact event for your player movement? Are you using physics movement or just setting position?

  • I put this action for player event (Touch>Is in Touch)

    a) move forward player.LinearSpd pixels

    b )rotate player.RotationSpd degrees toward( Touch.X, Touch.Y)

    with instance variable player LinearSpd=3

    with instance variable player RotationSpd=6

    Player move fine, but like i try explain, he over cross the solid object when I move it, when I release button mouse, the player doen´t cross this solid object (Simple rectangles), It´s very strange. Seem player doesn´t recognize when I move it the solid objects.

    Thanks a lot.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I can't remember off the top of my head: is "move player forward" under the physics category? If it's not under the physics category then it won't follow physics rules while acting that out. That seems like the issue you are describing. I only remember physics movements to be apply impulse and apply force

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)