SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 09/02/2019, 11:06 PM   #21
m4karow
Huge Clucker
 
Join Date: Oct 2015
Posts: 286
Reputation: 37
Default Re: Need help with spatial geometry

how this crane system look like and how should it work?
m4karow is offline   Reply With Quote
Old 09/02/2019, 11:38 PM   #22
Lunoxx
Big Clucker
 
Join Date: Feb 2015
Posts: 54
Reputation: 0
Default Re: Need help with spatial geometry

Quote:
Originally Posted by m4karow View Post
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
__________________
Skype: alin.m99
Discord: lunoxx#1155
FB Page: f.a.c.e.book.com/pawnscripts
Lunoxx is offline   Reply With Quote
Old 10/02/2019, 06:28 PM   #23
m4karow
Huge Clucker
 
Join Date: Oct 2015
Posts: 286
Reputation: 37
Default Re: Need help with spatial geometry

Quote:
Originally Posted by Lunoxx View Post
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.
m4karow is offline   Reply With Quote
Old 10/02/2019, 08:31 PM   #24
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,883
Reputation: 1321
Default Re: Need help with spatial geometry

Quote:
Originally Posted by m4karow View Post
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.
Pottus is offline   Reply With Quote
Old 11/02/2019, 03:15 PM   #25
Lunoxx
Big Clucker
 
Join Date: Feb 2015
Posts: 54
Reputation: 0
Default Re: Need help with spatial geometry

Quote:
Originally Posted by m4karow View Post
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 View Post
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.
__________________
Skype: alin.m99
Discord: lunoxx#1155
FB Page: f.a.c.e.book.com/pawnscripts
Lunoxx is offline   Reply With Quote
Old 12/02/2019, 12:45 AM   #26
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 2,849
Reputation: 675
Default Re: Need help with spatial geometry

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 View Post
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 Code:
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;
Nero_3D is online now   Reply With Quote
Old 12/02/2019, 03:19 AM   #27
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,883
Reputation: 1321
Default Re: Need help with spatial geometry

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.
Pottus is offline   Reply With Quote
Old 13/02/2019, 06:02 AM   #28
Lunoxx
Big Clucker
 
Join Date: Feb 2015
Posts: 54
Reputation: 0
Default Re: Need help with spatial geometry

Bump
I will try your sugestion Nero, thank you.
__________________
Skype: alin.m99
Discord: lunoxx#1155
FB Page: f.a.c.e.book.com/pawnscripts
Lunoxx is offline   Reply With Quote
Old 13/02/2019, 04:31 PM   #29
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 2,849
Reputation: 675
Default Re: Need help with spatial geometry

Quote:
Originally Posted by Pottus View Post
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
Nero_3D is online now   Reply With Quote
Old 13/02/2019, 10:55 PM   #30
Lunoxx
Big Clucker
 
Join Date: Feb 2015
Posts: 54
Reputation: 0
Default Re: Need help with spatial geometry

Quote:
Originally Posted by Nero_3D View Post
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?
__________________
Skype: alin.m99
Discord: lunoxx#1155
FB Page: f.a.c.e.book.com/pawnscripts
Lunoxx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pawno Geometry cengiz6155 Scripting Help 26 25/04/2018 11:46 AM


All times are GMT. The time now is 04:29 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.