<rotation>-1.660796 0.000000 0.000000</rotation>
CreateObject,ID,x,y,z,-1.660796 0.000000 0.000000);
CreateObject(ID,x,y,z,0.00000000,0.00000000,-95.15660143);
|
the ones given after converting the map (@ convertFFS) are the correct ones.
|
|
i know, but i am making my own converter!
so how i can transform the mta rotations to samp rotations, because there different |
|
i know, but i am making my own converter!
so how i can transform the mta rotations to samp rotations, because there different |
Private Function radians2degrees(ByVal radians As Double) As Double
Dim degrees As Double = Math.Round(radians * 180.0 / Math.PI, 6)
If radians = 0.0 Then
Return 0.0
End If
radians2degrees = degrees
End Function
, didnt knew before MTA used other rotations
|
Try multiplying by 180 and then dividing by pi, i believe thats how i did it in one of my previous apps the required MTA rotation converting.
|
Public Function GetObjects(ByVal map As String)
Dim i As Integer
Dim temp As String
Dim result As String = "//objects:"
On Error GoTo stage2
For i = 1 To 999999999
temp = Split(map, "<object name=")(i)
Next
Exit Function
stage2:
i = i - 2
Dim a As Integer
For a = 0 To i
temp = Split(map, "<object name=")(a + 1)
temp = Split(temp, "</object>")(0)
Dim position As String
Dim rotation As String
Dim id As String
id = Split(temp, "<model>")(1)
id = Split(id, "</model>")(0)
position = Split(temp, "<position>")(1)
position = Split(position, "</position>")(0)
position = "," & Replace(position, Chr(32), ",") & ","
rotation = Split(temp, "<rotation>")(1)
rotation = Split(rotation, "</rotation>")(0)
rotation = Replace(rotation, Chr(32), ",")
Dim x As Decimal, y As Decimal, z As Decimal
x = Replace(((Split(rotation, ",")(0)) * 57.2957795), Chr(32), "")
y = Replace(((Split(rotation, ",")(1)) * 57.2957795), Chr(32), "")
z = Replace(((Split(rotation, ",")(2)) * 57.2957795), Chr(32), "")
rotation = x & "," & y & "," & z & ");"
result = result & vbCrLf & " CreateObject(" & id & position & rotation
Next
Return result
End Function
|
What exactly is wrong with the x and y? Im not really that good in VB, but i'll try to help lol.
btw if this is for mta 1.0, i dont think you need to convert lol. I built this a while back (loads .map files) and its been working without needing any conversions. http://forum.sa-mp.com/showpost.php?...2&postcount=25 |
|
Try multiplying by 180 and then dividing by pi, i believe thats how i did it in one of my p(...)
|
|
Originally Posted by ;781140
read my edited post
|