Pantograph raising and lowering system

So should I be adding or removing half the size of the hand to the origin or somewhere else?

Depends, if you want to offset the Origin of the Ray, then add the half size of Hand (up)
If you want to offset the final distance, then subtract the half size of Hand (down)

Iā€™ve got to go to bed now but, Iā€™ll provide you with this new place file with updated code and stuff for you to test and mess around if you want to. I was kind of in a rush because I was a bit late to go to bed and it was kind of confusing me of what you were meaning lol

Iā€™ll continue to work on it tomorrow night

Just so I donā€™t have to make another post, would it also be possible if you help make the target angle of the hand in the hinge to be the same as the rotation of the wire Iā€™m having a little trouble explaining what Iā€™m trying to do to chat GBT lol. The issue might be because when the pantograph raises the angle of the hand will also make it look different but stay the same if you know what I mean.

Thank you for your help.

1 Like

Hello!

Iā€™ve been working on a couple things for the pantograph and a test I have ran was if the pantograph isnā€™t center with the wire on its Z axis then it wonā€™t find the wire thatā€™s above the pantograph so would there be a way to fix this issue or do the pantograph and wire have to be centered on its X axis?

Another issue Iā€™m having is that the pantographs hand is gone halfway through the wire, is there any way to fix this?

image

Have you taken a look at the new test file I sent you last night?
I changed the hinges target angle manually that is why its aligned with the wires orientation, so Iā€™m still needing to figure out how to automatically do which might be a challenge lol.

Nope sorry, I did not check it. Iā€™ve been busy. If you wish send me the new file and I could take a look right now

1 Like

Thatā€™s ok.

The file is in the quote below.

So you didnt made any changes or progress compared to file of yesterday? or you edited it to include the new one?

Iā€™ve updated the first file I sent you, which the update file is the quoted part. If its not the updated one then let me know and I will resend it.

I think the issue with the hands got something to do with me using the * symbol instead of the + symbol because it prints different numbers. Using the * symbol prints out 15 and using the + symbol prints out 11 but for some reason using the plus symbol will not work in the raycast. If this is any help to you.

Iā€™ve spent about three hours working on it and Iā€™ve gotten no where so I will have to try again tomorrow. I should have a lot more time to work on the pantograph tomorrow and Sunday. I have no idea why the pantograph is not going to the correct height. The top of the hand has to touch the bottom of the wire that is above the wire. Iā€™m not sure if it has to do with something the calculations chat GBT has given me, I have tried to get it to give calculate it/re code it but that also did not work.

Let me know how you get on when you have the time to try.

Mhh. I tested your file, and I suggest change the approach entirelyā€¦

Even if you make it work, it will cause lot of issues when the train is moving, at least its what I think. In this video Im using raycast yes, but, the hinges are not Servos. the height of the Hand its based on Hit.Position, not Distance, the Hand is raised by Motor6D so the Train can move while changing the Hand height based on Raycasting to always get the final position when hits the wire.

Plus, the hinges that you positioned based on the mesh, are very likely to fail, those hinges doesnt really know the shape of your meshesā€¦

Honestly its the first time I tried to do this. But, on my side its kinda working, but I should to rebuild your pantograph mesh entirely and make my own based on parts and just using meshes to replace the visuals of the modelā€¦

My approach is not finished yet, needs more work, but I dont have more free time to do this.

If you cant watch the video I suggest you download itā€¦

This looks more like something that should be solved by IK joints, Im not really experienced on that, I clearly remember someone who is awesome on that topic and its very active on forum, I hope not being rude by taggingā€¦ they could be busy, @dthecoolest

2 Likes

Oh thank you for your test and your approach. The pantograph on the train that moves that can raise up but without looking for the wire just falls down when the train moves lol.

I have no idea what IK joints are but I have seen developers name their animations IK (animation name)

One other issue there is if the wire and pantograph arenā€™t on the same axis left and right then the raycast wonā€™t detect the wire since it casts from the centre or the pantograph. Would there be a way to fix this?

Do you think you could provide me with your version of the place file or a model? I might be able to finish working on it.

Thanks your all the help.

Iā€™ve just watched the video again, and Iā€™ve noticed that the thingy for the hinges are shown there right at the start, are they disabled or are they something that helps with it?

Sure, but I would like to work a lil bit more on the approach cause I got a weird placement of the hinges, going to one side, like being splited.

Are disabled, those just works as anchor points that can be rotated, the only thing actually moving is the hand going to Hit.Position, and the arms are just pulled by the Hand

Ahhh ok, thanks! Once your finished and youā€™ve sent it to me then Iā€™ll probably do a couple things then Iā€™ll apply it to the train and then send a video of it to you.

Oh ok, so do the hinges still move but only controlled by the hand?

Yeah, its like pulling a box with a rope attached, the rope just bends according to the box, if you pull it upwards it extends if you bring it downwards it retracts. The rope has none control over the hand, the hand controls the rope

Yup, I got you.

Quick question but do you know how long it might take you to fix weird bug you were wanting to fix? No rush because Iā€™m working the GUI side of the train.

Also a raycast issue Iā€™ve had is if the wire and pantograph arenā€™t on the same X axis then the raycast wonā€™t detect any wires since it casts from the centre or the pantograph. How would I fix this?

Some vids:

1 Like

Seems that rotation on any axis doesnt affect the expected behaviour:

1 Like

This looks really good and cool.

Sorry, I meant if the pantographs X axis in position isnā€™t the same as the wires X axis in position that the raycast wonā€™t detect it. This was only a problem on my version so Iā€™m not sure if it would be a problem on your version either.

Would you like to see the pantograph in action on the real moving train when I add your version of the pantograph to it?

Why the raycast wont detect the wires? if the ā€œwiresā€ is a wide collision box? Remember that I told you that the wires are just visuals? the collisionBox should be the one that gets the hit, and the collisionBox is as wide as all wires.

Nope, its not, cause there is a collisionBox which is wide.

What do you mean by ā€œreal moving trainā€?
The videos I sent indeed has a real moving train on any possible axis. Yeah I know this approach will work with the train moving by script on any possible rotation and always positioning the pantoHand in its proper place (touching the wires)