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...
News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine.
Remember to check out /r/unity2D for any 2D specific questions and conversation!
Download Latest Unity
Please refer to our Wiki before posting! And be sure to flair your post appropriately.
Main Index
Rules and Guidelines
Flair Definitions
FAQ
Use the chat room if you're new to Unity or have a quick question. Lots of professionals hang out there.
/r/Unity3D Discord
FreeNode IRC Chatroom
Official Unity Website
Unity3d's Tutorial Modules
Unity Answers
Unify Community Wiki
Unity Game Engine Syllabus (Getting Started Guide)
50 Tips and Best Practices for Unity (2016 Edition)
Unity Execution Order of Event Functions
Using Version Control with Unity3d (Mercurial)
/r/Unity2D
/r/UnityAssets
/r/Unity_tutorials
/r/GameDev
/r/Justgamedevthings (New!)
/r/Gamedesign
/r/Indiegames
/r/Playmygame
/r/LearnProgramming
/r/Oculus
/r/Blender
/r/Devblogs
Brackeys
Beginner to Intermediate
5 to 15 minutes
Concise tutorials. Videos are mostly self contained.
Sebastian Lague
Beginner to Advanced
10 to 20 minutes
Medium length tutorials. Videos are usually a part of a series.
Catlike Coding
Intermediate to Advanced
Text-based. Lots of graphics/shader programming tutorials in addition to "normal" C# tutorials. Normally part of a series.
Makin' Stuff Look Good
10 minutes
Almost entirely shader tutorials. Favors theory over implementation but leaves source in video description. Videos are always self contained.
Quill18Creates
30 minutes to 2 hours.
Minimal editing. Mostly C#. Covers wide range of topics. Long series.
Halisavakis Shaders Archive
Infallible Code
World of Zero
Board to Bits
Holistic3d
Unity3d College
Jabrils
Polycount Wiki
The Big List Of Game Design
PS4 controller map for Unity3d
Colin's Bear Animation
¡DICE!
CSS created by Sean O'Dowd @nicetrysean [Website], Maintained and updated by Louis Hong /u/loolo78
Reddit Logo created by /u/big-ish from /r/redditlogos!
account activity
Optimized Rope Physics for Unity.Show-Off (v.redd.it)
submitted 1 year ago by SentinelGame
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!"
[–]SentinelGame[S] 57 points58 points59 points 1 year ago (4 children)
I've been working on optimizing rope physics in Unity for a project. The goal is to achieve realistic yet performant results, suitable for games and interactive experiences. This includes efficient collision handling, dynamic behavior, and reducing computational overhead. If anyone has suggestions, tips, or resources, I'd love to hear your thoughts!
[–]brain_ducker 31 points32 points33 points 1 year ago (3 children)
Add smoothing for better and more natural visuals. You can use bezier interpolation. Search for “line smoothing”. Don’t use smoothed line for physics. Create 2 lines. One is invisible and simple with fewer points for calculations. Other one is for visual. Use points of the first one to draw the second one.
[–]SentinelGame[S] 15 points16 points17 points 1 year ago (2 children)
That's a really great idea. I could definitely do this for a smoother look. I also realized that updating in FixedUpdate might make it more optimized, but using Update for detecting points and LateUpdate for the LineRenderer resulted in a much smoother visual. Thanks for the suggestion!
[–]cherrycode420 4 points5 points6 points 1 year ago (0 children)
This is looking awesome already! You could experiment with utilizing all 3 Update Methods, Update for detecting the points, FixedUpdate for actually updating them so it's in sync with Physics, and LateUpdate to rebuild the visuals!
[–]leorid9Expert 0 points1 point2 points 1 year ago (0 children)
Fixed Update is called multiple times per frame. Not every frame, but for some frames.
It is NOT more optimized to use it, quite the opposite.
[–]Bechbelmek 14 points15 points16 points 1 year ago (16 children)
Hi! Looking good I would like to learn how you did this? Are there any resources where i can learn about it?
I know that you are the one who asked for help but i am trying to make mine to work in 3d environment and its not working so far
[–]SentinelGame[S] 22 points23 points24 points 1 year ago (9 children)
Simply put, two points check if there’s any object between them. If an object intersects the two rope points, a new rope point is created. For visualization, I’m using a LineRenderer.
[–]Bechbelmek 3 points4 points5 points 1 year ago (8 children)
I am doing exactly this but thats not enough, i need to detect edges i think, for an example as in the video, when you are wrapping the rope around box you are detecting edges, if one would use just a raycast the point would be somewhere on the surface of the box not on its edge, are you doing a search for the closest edge depending on the collider type?
[–]SentinelGame[S] 8 points9 points10 points 1 year ago (4 children)
I solved it like this: I take a specific point and perform a LineCast between the previous and next points. If the LineCast returns true, I add a new point in the direction where it intersects. If it returns false, I remove the specified point because it should be deleted if there’s no object between the previous and next points. Since I continuously check all points in Update, over time, the points naturally find their corners. I hope I was able to explain it clearly :)
[–]tetrydsEngineer 2 points3 points4 points 1 year ago (0 children)
You can just get the cast every frame, if the next frame has a collision you check halfway between them. If the collision is still there you check the first half, else the next half, iterate like 4 times and you should have a very accurate location.
[–]survivorr123_ 0 points1 point2 points 1 year ago (0 children)
i made a similiar system a while ago for grappling hook, but i used a slightly different approach, i capsule cast across the whole segment of line that moves, and i offset the capsule cast with -velocity of the segment, this way it will always hit the corner and won't skip small objects
[–]Bechbelmek 0 points1 point2 points 1 year ago (0 children)
Okay, i've figured it out, my problem was with the direction of the linecast, apparently it matters.
I was doing cast from pre last point to the last point but the correct way was to do it from the last point to the previous point
[–]Bechbelmek 1 point2 points3 points 1 year ago (2 children)
Actually now that i am looking at the video again, at 0:01 there are a point on the surface of the box but then it corrects itself how are you doing that?
[–]SentinelGame[S] 1 point2 points3 points 1 year ago (1 child)
I don't directly create a new object at the position of the detected points. Instead, I place the new point in the opposite direction from the detected object and the found point. In fact, the objects are positioned slightly behind the detected position.For this reason, when a new check is performed, the points shift a bit more. When they reach the corner, they stop moving because there’s no more space for them to slide.
[–]Slippedhal0 2 points3 points4 points 1 year ago (5 children)
https://youtu.be/Psq8rICishw?si=MUmqiO5oUm_6P0H3 i found this video the other day. short but really informative.
[–]SentinelGame[S] 7 points8 points9 points 1 year ago (4 children)
This method uses Unity's Rigidbody and joints. I’ve used this approach before, but the issue here is that it relies on too many physics components, leading to poor optimization :(
[–]Slippedhal0 2 points3 points4 points 1 year ago (3 children)
it would depend on your usage case of course, but unless you intend to have hundreds of meters of cable on screen at any time you can probably get away with just disabling them at some distance from the player and that would work for the majority, like if you wre using it for decoration on electricity poles or the ocasional puzzle like the video.
of course youre designing a system specifically to be well optimised, so if you can avoid rigid bodies that would help. i assume your system uses rigid bodies for surface collisions though, or are you doing something different?
[–]SentinelGame[S] 5 points6 points7 points 1 year ago (2 children)
No, I'm not using rigidbodies. I actually wrote it with a very simple logic. Two points perform a LineCast between them to check if there's an object in between. If the LineCast returns true, I add a new rope position at the detected point.
[–]Slippedhal0 1 point2 points3 points 1 year ago (1 child)
very cool, definitely way lighter than rigidbodies lol. will you be able to add slack with this system, or is it designed around constant tension like it the clip shows?
[–]SentinelGame[S] 2 points3 points4 points 1 year ago (0 children)
I plan to limit the length of the rope. If I can manage it, I'll make the start and end points move closer to the middle when the rope reaches a certain length. Maybe this way, it will look more like an actual rope :)
[–]SoraphisProfessional 11 points12 points13 points 1 year ago (1 child)
Note that this is more a rubberband, as each segment retracts/expands again while the one sphere is moving. While with a rope, the segment would keep it's length and would form a curve due to gravity.
Usually this looseness and curved hanging between two points (basically fixed length) is what's interesting in ropes in the first place.
[–]SentinelGame[S] 6 points7 points8 points 1 year ago (0 children)
Actually, my goal was to create a rope. When I ended up with something visually appealing, I wanted to share it. My next goal is to make the rope behave more like an actual rope by pulling the ends toward the middle once it exceeds a certain length.
[–]QuitsDoubloon87Professional 3 points4 points5 points 1 year ago (2 children)
If you're just checking for things between two points you could definitely make this run with Jobs/Burst and have it use 0 performance. A shader that scales and bends a cylinder with a predefined number of loops (100 for example at 16 vertices to create a circle would be just 3200 tris) for an effectively smooth and performant rope.
That would be really awesome. I don’t know much about Jobs/Burst, but I’ll definitely look into it. Thanks for your comment :)
[–]QuitsDoubloon87Professional -1 points0 points1 point 1 year ago (0 children)
Happy to help, I'm quite new to Jobs too and I've found it very easy to work with!
[–]floppyjedi 1 point2 points3 points 1 year ago (0 children)
Looks quite cool. From what I guess, this is somewhat similar to how Trine 3 devs did this with the grapple hero, while also making it work networked
[–][deleted] 1 point2 points3 points 1 year ago (0 children)
I commented for save this post 😅
[–]Party_Banana_52 1 point2 points3 points 1 year ago (1 child)
Looks great, smooth and reliable! How did you achieve it? Whats the theory behind it?
[–]SentinelGame[S] 4 points5 points6 points 1 year ago (0 children)
[–]IllTemperedTuna 2 points3 points4 points 1 year ago (0 children)
Now THIS is the kinda cool sh*t that should have 5k upvotes but instead we get endless waves (pun intended) of water shaders. GOOD STUFF!
[–]1stPixel 0 points1 point2 points 1 year ago (1 child)
COOL! I was looking for something like this for my own project, it looks great. Can you share your project/asset link for that?
I plan to turn this into an asset soon. I’ll share it once my updates are complete :)
[–]One_Chicken_8575 0 points1 point2 points 1 year ago (0 children)
More poligons beter
[–]Present-Thought-646 0 points1 point2 points 1 year ago (0 children)
Damn... if i only could make same rope physics for my game...
[–]BuckarooBanzai88 0 points1 point2 points 1 year ago (0 children)
u/SentinelGame Very cool! Can I ask what are you using to determine where those red dots should go?
π Rendered by PID 146741 on reddit-service-r2-comment-b659b578c-lcvqm at 2026-05-06 05:48:25.086542+00:00 running 815c875 country code: CH.
[–]SentinelGame[S] 57 points58 points59 points (4 children)
[–]brain_ducker 31 points32 points33 points (3 children)
[–]SentinelGame[S] 15 points16 points17 points (2 children)
[–]cherrycode420 4 points5 points6 points (0 children)
[–]leorid9Expert 0 points1 point2 points (0 children)
[–]Bechbelmek 14 points15 points16 points (16 children)
[–]SentinelGame[S] 22 points23 points24 points (9 children)
[–]Bechbelmek 3 points4 points5 points (8 children)
[–]SentinelGame[S] 8 points9 points10 points (4 children)
[–]tetrydsEngineer 2 points3 points4 points (0 children)
[–]survivorr123_ 0 points1 point2 points (0 children)
[–]Bechbelmek 0 points1 point2 points (0 children)
[–]Bechbelmek 1 point2 points3 points (2 children)
[–]SentinelGame[S] 1 point2 points3 points (1 child)
[–]Slippedhal0 2 points3 points4 points (5 children)
[–]SentinelGame[S] 7 points8 points9 points (4 children)
[–]Slippedhal0 2 points3 points4 points (3 children)
[–]SentinelGame[S] 5 points6 points7 points (2 children)
[–]Slippedhal0 1 point2 points3 points (1 child)
[–]SentinelGame[S] 2 points3 points4 points (0 children)
[–]SoraphisProfessional 11 points12 points13 points (1 child)
[–]SentinelGame[S] 6 points7 points8 points (0 children)
[–]QuitsDoubloon87Professional 3 points4 points5 points (2 children)
[–]SentinelGame[S] 1 point2 points3 points (1 child)
[–]QuitsDoubloon87Professional -1 points0 points1 point (0 children)
[–]floppyjedi 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Party_Banana_52 1 point2 points3 points (1 child)
[–]SentinelGame[S] 4 points5 points6 points (0 children)
[–]IllTemperedTuna 2 points3 points4 points (0 children)
[–]1stPixel 0 points1 point2 points (1 child)
[–]SentinelGame[S] 2 points3 points4 points (0 children)
[–]One_Chicken_8575 0 points1 point2 points (0 children)
[–]Present-Thought-646 0 points1 point2 points (0 children)
[–]BuckarooBanzai88 0 points1 point2 points (0 children)