Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

A way to make a dynamic string

A topic by L Developer created Feb 29, 2024 Views: 214 Replies: 2
Viewing posts 1 to 3
Submitted

I was thinking about some ideas and I was wondering if there is a way to make a dynamic line of pixels for the fishing rod, especially if the player wants to move when the bait is set the line should stretch, but I don't really know how.

If you instead know how to obtain that effect but only in a 3D environment, feel free to share your knowledge too.

I use Unity.

Submitted

I think the only way is using some number of objects and bind them with the hinge joints

Submitted (1 edit)

I mean, I just used the LineRenderer. With these two lines of code:

link.GetComponent<LineRenderer>().SetPosition(0, transform.position);

link.GetComponent<LineRenderer>().SetPosition(1, target.position);

(though, I don't know if this would work in 3d.)