Need code for an object swinging on a line

Blitz3D Forums/Blitz3D Programming/Need code for an object swinging on a line

3DFish(Posted 2005) [#1]
Hey guys

Do any of you have some code for an object hanging
on a piece of line and swinging sideways and in circles.

I need this for my next project Adventure fishing 3.
A fly fishing game.

Thanks
3DFish


jhocking(Posted 2005) [#2]
On the one hand, that's a pretty vague request. Normally I would ask for clarification on exactly what you want. On the other hand, the fact that this is for a fishing game makes me assume the object is a fish pulling on the line and jerking around.

This isn't necessarily an ideal approach, but a simple trick would be to create a pivot at the end of the pole (ie. where the line is coming from) and parent the fish to that pivot. Now if you rotate the pivot, the fish will be orbiting around that point.


WolRon(Posted 2005) [#3]
Verlet constraints?


3DFish(Posted 2005) [#4]
Thanks

The line is fly line hanging from the tip of a fly rod.
A fly will be attached to the end of the line.
I need a swinging effect (the fly).

My sin,cos,tan maths are a bit on the shaky side.


jhocking(Posted 2005) [#5]
"swinging" is actually the part I wanted clarification on. Are you talking about the movement of the fly during casting?


3DFish(Posted 2005) [#6]
no, only the movement of the fly when holding the rod before a cast.


Jeppe Nielsen(Posted 2005) [#7]
Just something I just coded :-)

Try to catch the box with the rod.




3DFish(Posted 2005) [#8]
Wow Jeppe!

That's really neat..

I'm looking for something similar, only in 3D.
A rod tip (pivot).
More line pivots hanging from the rod tip.
Each line pivot should affect the other.

The line pivots should only start moving when the rod tip moves.

The line pivots needs to swing in the direction in which the rod tip moves.


KuRiX(Posted 2005) [#9]
Wow! Really impressive piece of code, i like it! congratulations!


IPete2(Posted 2005) [#10]
Wow!

Fab stuff, thanks for sharing that!

IPete2.


3DFish(Posted 2005) [#11]
Thanks for all the input guys.

I have found a solution.

Check out this thread by Mr. Picklesworth
http://www.blitzbasic.com/Community/posts.php?topic=39525&hl=rope