Page 1 of 1

Crane animation help needed

Posted: 18 Jul 2012, 17:56
by jamesbigmac
I haven't come up with a good way to make this work, and feel like an idiot because I can't figure it out. What I want to do is have a crane rotate its arm up when it is constructing a building, then have the hoist hook move up and down while it is building something. After the building is done, lower the crane and hoist hook back to their normal positions.

The parts I'm not sure about are:
1. Making sure the hoist hook and the rope stay upright the entire time (I'm assuming this can be done with StopSpin)

2. How to make the rope holding the hoist hook seem as though it is extending when the hoist hook is moving away from the crane arm, and then retracting when it moves toward the crane arm, the same as it would in real life.

I'm just confused as to how this is done using the Upspring origins and animation callouts.

Re: Crane animation help needed

Posted: 18 Jul 2012, 18:18
by smoth
origins at the base of the peices.

rotate crane arm 35, rotate crane rope at -35.

this will create the illusion you are seeking.

the origins needs to be

Crane arm(at base of crane arm)
rope(where rope meets crane arm)

I cannot give you an illustration but let me know if this helps.

Re: Crane animation help needed

Posted: 18 Jul 2012, 18:21
by zwzsg
Have the rope be a child of the crane tip.
Every time you rotate the crane, counter-rotate the rope exactly the same amount (but with opposed sign) at same speed.

jamesbigmac wrote:I'm assuming this can be done with StopSpin
Noooooo!


Also, I'm reminded of http://www.youtube.com/watch?v=1t0gnyejV6A

Re: Crane animation help needed

Posted: 18 Jul 2012, 19:31
by jamesbigmac
Well I hadn't seen that crane before, but the part where the claws drop down also elongates the connection between the claws and the rest of the gantry. Any idea how to take care of that part?

...and I just realized how stupid using StopSpin would have been.

Re: Crane animation help needed

Posted: 18 Jul 2012, 19:42
by smoth
I miss panties :(

Re: Crane animation help needed

Posted: 18 Jul 2012, 20:46
by PicassoCT
Do not make the rope swing, and do not have it react to wind. You will spend months..

Re: Crane animation help needed

Posted: 18 Jul 2012, 22:13
by Pressure Line
jamesbigmac wrote:Well I hadn't seen that crane before, but the part where the claws drop down also elongates the connection between the claws and the rest of the gantry. Any idea how to take care of that part?

...and I just realized how stupid using StopSpin would have been.
You'll need to chop the rope into shorter lengths. Ie if your rope is 16 elmos long at full length, cut it into 4 pieces, each 4 elmos long:
bos/cob wrote: ExtendRope()
{
move rope1 to y-axis [-4] speed [4];
move rope2 to y-axis [-4] speed [4];
move rope3 to y-axis [-4] speed [4];
move rope4 to y-axis [-4] speed [4];
sleep 1000;
}

RetractRope()
{
move rope1 to y-axis [0] speed [4];
move rope2 to y-axis [0] speed [4];
move rope3 to y-axis [0] speed [4];
move rope4 to y-axis [0] speed [4];
sleep 1000;
}
Lua wrote: local function ExtendRope()
Spring.UnitScript.Move(rope1,y,-4,4)
Spring.UnitScript.Move(rope2,y,-4,4)
Spring.UnitScript.Move(rope3,y,-4,4)
Spring.UnitScript.Move(rope4,y,-4,4)
Spring.UnitScript.Sleep(1000)
end

local function RetractRope()
Spring.UnitScript.Move(rope1,y,0,4)
Spring.UnitScript.Move(rope2,y,0,4)
Spring.UnitScript.Move(rope3,y,0,4)
Spring.UnitScript.Move(rope4,y,0,4)
Spring.UnitScript.Sleep(1000)
end

Re: Crane animation help needed

Posted: 19 Jul 2012, 05:00
by jamesbigmac
I was really hoping that there was a better way to do it rather than separate pieces, but if that's the way it has to be then that's the way it has to be.

Re: Crane animation help needed

Posted: 19 Jul 2012, 11:04
by PicassoCT
..and you dont even know the best part of it.. if it all works out.. and you poured hours of work in.. one of your testers going to play it .. and you look at him expecting praise.. and you dont even get a raise-
of an eyebrow.. because thats how rope are suppossed to work. Its not spectacular, if you copy paste the real world

Re: Crane animation help needed

Posted: 19 Jul 2012, 14:25
by jamesbigmac
Thanks for the pep talk Picasso.

Re: Crane animation help needed

Posted: 19 Jul 2012, 14:34
by PicassoCT
Those few people who know me, know about the conair rope months.

http://code.google.com/p/journeywar/sou ... script.lua

Re: Crane animation help needed

Posted: 19 Jul 2012, 14:38
by jamesbigmac
I am genuinely sorry that you had to go through that traumatizing experience. I didn't know....I DIDN'T KNOW!!

Re: Crane animation help needed

Posted: 19 Jul 2012, 14:56
by PicassoCT
Everybody else would have hanged himself.. but i couldnt.. the rope didnt work that well