How to draw the GLB object (like stem) from root position with mouse dragging?

I want to draw the flower GLB object with mouse movement like wizard stick. I’ve attached the video. Please help me.
Thank you.
flower (1).glb (1.0 MB)

First you need to figure out the points the object should curve along, this can give you a starting point. Then you can use this example which shows how to apply the curve to an object.

Thanks, Arthur. I considered about this before. But the stem is moving along the track in the standard, not the movement of snake. I don’t know why.

I’ve implemented this animation.
Thank you, everyone.