0 Favourites

Preventing "sliding" when colliding with objects

  • 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.
  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
167 14,513
DMT2005's avatar
DMT2005
Unread hot topic
123 14,873
Zebbi's avatar
Zebbi
Unread hot topic
36 3,665
totoe's avatar
totoe