Need help with spatial geometry
#21

how this crane system look like and how should it work?
Reply
#22

Quote:
Originally Posted by m4karow
Посмотреть сообщение
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
Reply
#23

Quote:
Originally Posted by Lunoxx
Посмотреть сообщение
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.
Reply
#24

Quote:
Originally Posted by m4karow
Посмотреть сообщение
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.
You didn't read what the problem was at all. Anyways I need to come on your server and show me what the problem is maybe we can do a team viewer session and I will help you figure it out.
Reply
#25

Quote:
Originally Posted by m4karow
Посмотреть сообщение
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.
I know how to get height, but i need real X and Y pozition on the map.

Quote:
Originally Posted by Pottus
Посмотреть сообщение
You didn't read what the problem was at all. Anyways I need to come on your server and show me what the problem is maybe we can do a team viewer session and I will help you figure it out.
Answer at my PM, please.
Reply
#26

Could you give us your createobject lines, to lazy to look up the modelids

And the _lnx part is kind of unnecessary
Quote:
Originally Posted by Lunoxx
Посмотреть сообщение
EDIT: _lnx because I saved in this function offsets in variables.
Because you can get the offsets with Streamer_GetFloatData if I am not mistaken

Also I am wondering, isn't is just the z rotation of your crane + distance of magnet +- height?, provided the crane is on a flat surface.

Something like that?
pawn Код:
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;
Reply
#27

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.
Reply
#28

Bump
I will try your sugestion Nero, thank you.
Reply
#29

Quote:
Originally Posted by Pottus
Посмотреть сообщение
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
Reply
#30

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
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?
Reply
#31

Quote:
Originally Posted by Lunoxx
Посмотреть сообщение
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
Reply
#32

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
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
This is what i want to do:
https://y-o-u-tu.be/oOVp9leMoNc (delete "-")
Reply
#33

another sugestion?
Reply
#34

Bump again
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)