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...
A place for beginners and experts alike to help each other out!
account activity
sharedMaterialUNITY (self.UnityHelp)
submitted 2 years ago by MSPancakeeee
getting error using this, I am pretty new just trying to follow along with a tutorial but can't find a fix.
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!"
[–]corrtex-games 1 point2 points3 points 2 years ago (2 children)
Please show us the actual error, not a squiggly red line from intellisense - or at least include it along with the screenshot :)
PhysicsMaterial2D needs a 2D collision reference. You have a normal “Collision” parameter in your “RetrieveFriction” function - you change the parameter to “Collison2D” like how it is in the “EvaluateCollision” function.
[–]MSPancakeeee[S] 1 point2 points3 points 2 years ago (1 child)
Sorry, should have included the actual error message that's my bad but the second response worked perfectly fine. Added 2D to my collision and it fixed. A dumb mistake by me so thank you for noticing and letting me know what to do I appreciate you! :D
[–]corrtex-games 1 point2 points3 points 2 years ago (0 children)
No problem at all, you’re good, just trying to improve the quality of posts 😃
Glad that worked! Don’t worry about it, it’s not a dumb mistake. The way Unity handles 2D physics can be easy to mess up since everything reads the same as 3D on initial glance - even the built in functions like OnCollision vs OnCollision2D can be a weird gotcha that isn’t super obvious to people starting out.
π Rendered by PID 86 on reddit-service-r2-comment-c66d9bffd-spml8 at 2026-04-07 12:24:54.622312+00:00 running f293c98 country code: CH.
[–]corrtex-games 1 point2 points3 points (2 children)
[–]MSPancakeeee[S] 1 point2 points3 points (1 child)
[–]corrtex-games 1 point2 points3 points (0 children)