Preventing "sliding" when colliding with objects

Get help using Construct 2

Post » Wed Sep 16, 2015 4:44 pm

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.

Code: Select all
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.


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.
B
4
Posts: 7
Reputation: 214

Post » Thu Sep 17, 2015 1:59 pm

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.

Image
B
4
Posts: 7
Reputation: 214

Post » Thu Sep 17, 2015 2:12 pm

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..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: ditocruz, mcscooter, RalleRoyal and 26 guests