How do I move an sprite without overlapping

0 favourites
  • 2 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • Hi, I have two solid objects(player and rock). The player have custom movement, when I press "W" it accelerates vertically -20000 and sets player variable "moving " to 1(initialized with 0). have WASD for the controlls(the same as the "W" but different dorections).

    When player collides with a rock and moving is 1 accelertion from customMovement is setted to 0 and variable moving to 0 too.

    The problem is when the player colllides with a rock, first if the player just rub the rock without a "collision" it stops and if the player collides with the rock it overlaps inside.

    Anyone have any idea what can I do?

    Thanks in advantage :d

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Give the Rock the "SOLID" behaviour and give the player the "PUSH OUT SOLID" behaviour.

    Now, add an event "on start of layout", and an action "Player: Add obstacle: Rock" under that.

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