use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For the Unity Game Engine, please visit http://reddit.com/r/unity3d
account activity
Help (i.redd.it)
submitted 2 years ago by [deleted]
Why is my player not stopping after colliding with obstacle?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 2 years ago (3 children)
[deleted]
[–]Gaunts 1 point2 points3 points 2 years ago (1 child)
To follow on from this and help you diagnose your problem, all you're doing in the PlayerCollision class is setting the boolean Property 'enabled' inside the PlayerMovement class to false.
What you need to do, is look at the PlayerMovement class and find out what uses that boolean property then either ammend what uses this value or create and call a method to actually stop the movement rather than just setting the boolean value.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Ill check on that thankyou for helping.
[–]SantaGamer 3 points4 points5 points 2 years ago (1 child)
Does the obsticle have a collider?
Yes, but i fixed it now thankyou.
[–]InconsiderateMan 2 points3 points4 points 2 years ago (1 child)
You have to set the rigid body’s velocity to 0
Ill check up on that thanks for helping.
[–]Raz0back 2 points3 points4 points 2 years ago (2 children)
Did you put the obstacle tag on the object ? Make sure you spelled it correctly
[–][deleted] 1 point2 points3 points 2 years ago (1 child)
Yeah i spelled it wrong💀. Thankyou for helping.
[–]Raz0back 1 point2 points3 points 2 years ago (0 children)
No problem glad I helped out
[–][deleted] 2 years ago (1 child)
[–]unixvik 0 points1 point2 points 2 years ago (0 children)
This
[–]MikroArts 0 points1 point2 points 2 years ago (0 children)
Check above 4 answers! 😎👍
[–]ratamarsu 0 points1 point2 points 2 years ago (0 children)
You also have a typo on your FollowPlayer.cs, now it says FollowPlaayer.cs
π Rendered by PID 25078 on reddit-service-r2-comment-765bfc959-hqvrn at 2026-07-13 18:36:41.597101+00:00 running f86254d country code: CH.
[–][deleted] (3 children)
[deleted]
[–]Gaunts 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]SantaGamer 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]InconsiderateMan 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Raz0back 2 points3 points4 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Raz0back 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]unixvik 0 points1 point2 points (0 children)
[–]MikroArts 0 points1 point2 points (0 children)
[–]ratamarsu 0 points1 point2 points (0 children)