Re: Need help with spatial geometry -
m4karow - 09.02.2019
how this crane system look like and how should it work?
Re: Need help with spatial geometry -
Lunoxx - 09.02.2019
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
Re: Need help with spatial geometry -
m4karow - 10.02.2019
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.
Re: Need help with spatial geometry -
Pottus - 10.02.2019
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.
Re: Need help with spatial geometry -
Lunoxx - 11.02.2019
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.
Re: Need help with spatial geometry -
Nero_3D - 12.02.2019
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;
Re: Need help with spatial geometry -
Pottus - 12.02.2019
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.
Re: Need help with spatial geometry -
Lunoxx - 13.02.2019
Bump
I will try your sugestion Nero, thank you.
Re: Need help with spatial geometry -
Nero_3D - 13.02.2019
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
Re: Need help with spatial geometry -
Lunoxx - 13.02.2019
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?
Re: Need help with spatial geometry -
Nero_3D - 13.02.2019
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
Re: Need help with spatial geometry -
Lunoxx - 14.02.2019
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 "-")
Re: Need help with spatial geometry -
Lunoxx - 16.02.2019
another sugestion?
Re: Need help with spatial geometry -
Lunoxx - 19.02.2019
Bump again