Preventing "sliding" when colliding with objects

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi guys,

    When my player object collides with another object (like an enemy or an obstacle), I have been experiencing weird behavior that I haven't been able to solve.

    CASE:
    The player object is rotating while stationary.
    The player object encounters an enemy or obstacle while rotating.
    
    EXPECTED BEHAVIOR:
    The player object's rotation halts.
    
    ACTUAL BEHAVIOR:
    The player object pushes itself out and away from the enemy or obstacle to allow full rotation.[/code:3kqlcxe9]
    
    This is occurring to the extent that I can actually force the player to "slide" around a vehicle if I push forward on the momentum and rotation keys the right way.   
    
    For reference, the player object uses Custom Movement, though it used to use Car (I switched to try and combat the issue).
    
    I suspect it's something to do with the push out solid behavior.   Can anyone help?  I'm lost as to what to try.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bump. Really hope someone can help. Here's an instance of what I'm talking about. The rotation needs to stop entirely on collision, not push the tan vehicle out like that.

  • Depending on how you have things set up I guess you could have an instance variable rotating and check if the object "shifts" while rotating and if so place it back to the original position..

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