Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1403812 Posts in 68294 Topics- by 61958 Members - Latest Member: Kvrochi

December 09, 2022, 10:46:52 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Question about setup for hinge joint in unity
Pages: [1]
Print
Author Topic: Question about setup for hinge joint in unity  (Read 603 times)
ArtInkStudios
Level 0
**


Art Ink Studio Logo


View Profile WWW
« on: October 18, 2022, 03:57:38 AM »

I have a question about creating a hinge joints for a 2d sprite of a vector graph snake in a horizontal position in unity. That way its setup is that the snake is in a horizontal position as you move it the body sort of in curve position in the "X" axis. Something similar to the movement of a Jointed Snake Toy. But, after looking up and found tutors only discuss the vertical position of a hinge joint, and I do not know how to create the curve position without pulling the 2d object downward from the "X" axis. Here is a snapshot of the vector art snake for visual example.   
Logged
Thaumaturge
Level 10
*****



View Profile WWW
« Reply #1 on: October 21, 2022, 08:05:38 AM »

I'm not familiar with Unity's joints, so this may not be a useful suggestion, but can you perhaps rotate the joint such that it moves in the horizontal rather than the vertical?
Logged

ArtInkStudios
Level 0
**


Art Ink Studio Logo


View Profile WWW
« Reply #2 on: October 24, 2022, 12:28:59 PM »

I finally solved it by connect two transparent 2d sprite in front of the head and at the end of tail of the snake. I made the transparent 2d sprite as the main pulley where its not only pulling the head of the snake, but the body while the transparent 2d sprite that is behind the tail with a hinge joint 2d that is connect to the tail. I also set the rigidbody 2d's gravity scale 1 to the six body part and set the rigidbody 2ds gravity scale to -12 for the transparent 2d sprite in front of the head of the snake. To give it a flexible, but rag doll like snake that we was looking for. But, thanks for the tip. 
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic