Thanks Scoop. Got it working.
I had to add PI/2, otherwice it started on wrong location in the period.
Thanks alot.
Still one problem. The X.
That's a real tricky one. Because when the distance between x1 and x2 gets shorter, the ropes Xs needs to be nearer eachother.
It works if I take the RopeLength-CurrentLength(between x1 & x2)/amount of points
And then do:
p= RopeLength-CurrentLength(between x1 & x2) / amount of points;for(i=0;i<amountofpoints;i++){point[i].x=(2.0f-p)*i; (I have 2 pixels between every point/ball)}
|
but when the rope start to look like a U I need more points in the beginning and end.
So the X need to look like:
***** * * * * * * * * * * * * * * * * *****
You can see this in my image.
So my idea would make it accelerating and then deaccelerating
using:
by starting from 0 and going to:
2*RopeLength-CurrentLength(between x1 & x2) / amount of points;
But when the distance was less then half the size of the rope it went funny.
How would you do THIS?
/MindWipe
"If it doesn't fit, force it; if it breaks, it needed replacement anyway."
Edited by - MindWipe on August 10, 2001 1:53:54 PM