- Home /
[2d Game]How to attach gameObject with HingeJoints
i want to when I click a first place his doing anything, but when I click a second place in a time lapse of about five seconds, its creates a spider web, so a texture or gameobject who owns a hingejoint and attach the two things hit during it's two clicks. Don't forgot, my game , was a 2d game...
I do some scripts, with the Line Renderer, but nothings work
what i want its more like this, i try to create a game, the game was simple, you are a spider, and you create some web, but line, straight, web, the system its simple, its like the Attachment in $$anonymous$$erbal Space Program, but i search on Internet, and i found the LineRenderer, but its a bad idea, because lineRenderer was'nt straight Line, and not collide with other object.
Ive also try the Bresenham's Algorythm, but the ony problem , was simple, the line created don't have hingejoint or any colliders to create a Web aspect
Answer by jtsmith1287 · Sep 07, 2014 at 07:07 AM
http://docs.unity3d.com/Manual/class-HingeJoint.html
http://unity3d.com/learn/tutorials/modules/beginner/2d/hingejoint2d
A single google search revealed both of these links, and I'm positive you can find your answer there. I would also like to say that you should spend some more time on making your words make sense. I can barely make out what you're even asking. All I know is that you're doing something with hing joints in a 2D game. In the future, you should provide examples of code demonstrating what you're currently doing or have tried. This will help people assist you. It is impossible for someone to help you based on the information you've provided without coding the entire thing themselves. Good luck.
Sorry, English was not my first language, but i try something with the Line Renderer, but the line just work in the editor, but not in the game, and i dont konw if you know what is World of goo, if your answer is yes, i want to reproduce the drap and drop of the line of the goo in world of goo.
You just need to study the documentation and watch the videos. It explains it very well. :) Good luck.