09.02.2019, 23:06
how this crane system look like and how should it work?
If I can to get done with this system I will post a video here.
You can be a crane driver, your job is to take containers with that and put it on ship, that's the idea |
Maybe
(Ropeheight + Magnet height) = Magnet actual height I've made a pilot cargo job and calculated the height like this and it's work fine. |
EDIT: _lnx because I saved in this function offsets in variables.
|
x = craze_base_x + distance_to_magnet * floatsin(-crane_z_rot, degrees);
y = craze_base_y + distance_to_magnet * floatcos(-crane_z_rot, degrees);
z = craze_arm_z - magnet_offset;
But Nero he needs the rotation of the magnet since it is attached to objects the real world rotation of that magnet needs to be calculated through the attached object hierarchy object by object. If he attaches an object to the magnet then it wouldn't look smooth and just snap to an arbitrary attach rotation.
|
Well if the magnet is attached to the crane it should rotate with the crane, staying in its relative position.
To attach something to the magnet we would need the correct z offset, probably depending on the size of the target and the difference in z rotation x, y offset depending where the magnet attaches the target, x, y rotation shouldn't matter Anyway that is what I am thinking, to verfiy that I would need to test it |
I have problems only with X, Y position, I think i know how to get the Z coordonate.
What can I find X and Y? |
if you got your x and y of your magnet (#27) and x and y of your target you calculate the difference and use it as offset
how the attachment process gets triggered is up to you, maybe Objects Physics |