AfterAll14 Posted November 19, 2016 Share Posted November 19, 2016 Euler angles given by standart getVehicleComponentRotation are pretty much crazy when you try to sync vehicle components. Given values are difficult to interpolate.We have matrices for elements. So would be nice to have quaternions or matrices for vehicle components as well. Link to comment
Einheit-101 Posted December 5, 2016 Share Posted December 5, 2016 I sync vehicle components all day on my server and I have not the slightest issue. Link to comment
AfterAll14 Posted December 20, 2016 Author Share Posted December 20, 2016 MTA devs should understand what I mean. It's something that would make trouble when you use advanced smooth sync techniques. Link to comment
AfterAll14 Posted December 25, 2016 Author Share Posted December 25, 2016 setVehicleComponentRotation with matrices too please Link to comment
Fierelier Posted December 27, 2016 Share Posted December 27, 2016 Wouldn't that break compatibility to older scripts? It would not be that hard to convert these values to a vector yourself, or to write a function for it that does it automatically for you. Link to comment
qaisjp Posted January 4, 2017 Share Posted January 4, 2017 On 12/27/2016 at 1:30 PM, Fierelier said: Wouldn't that break compatibility to older scripts? It would not be that hard to convert these values to a vector yourself, or to write a function for it that does it automatically for you. The requirement is that you access it using OOP. vec = vehicle:getComponentRotation(...) x, y, z = getVehicleComponentRotation(vehicle, ...) Link to comment
AfterAll14 Posted January 4, 2017 Author Share Posted January 4, 2017 (edited) @qaisjp Well, actually what I originally meant by this suggestion was something like that: local matrix = vehicle:getComponentMatrix(..) vehicle:setComponentMatrix("dummy", matrix) As I started digging into MTA source by myself, it turned out adding this feature is quite easy. I'm going to include it in this update. I'm not planning to add vectors for return value for position/rotation, cause as @Fierelier said it could lead to compatibility issues. But if MTA devs think its necessary - so be it update: took a brief look at wiki - looks like getComponentPosition/getComponentRotation methods are not documented, though they are in the MTA code. So I think that means you can add vectors as return values. Those who used older versions should blame themselves then for using non-documented funcs update 2: ok, its actually poorly documented in the end : https://wiki.multitheftauto.com/wiki/OOP_client#Vehicle Edited January 4, 2017 by AfterAll14 Link to comment
qaisjp Posted January 4, 2017 Share Posted January 4, 2017 Get component matrix is possible too. Link to comment
MTA Anti-Cheat Team Dutchman101 Posted October 8, 2017 MTA Anti-Cheat Team Share Posted October 8, 2017 As you might know this was implemented earlier in response to this suggestion, only to be reverted later due to causing script compatibility issues. Now, in 1.5.5 (latest revision only) it's added back (r11712 onwards) https://wiki.multitheftauto.com/wiki/Changes_in_1.5.5 > Scripting > Client > ''Return vectors for vehicles component funcs (#9507)" @AfterAll14 @Einheit-101 Link to comment
Einheit-101 Posted October 8, 2017 Share Posted October 8, 2017 Uhm what exactly changed? The function as it worked before was perfectly fine and I hope I don't have to rework 1000 lines of stuff, because if I want a vehicle componeNt position then ... I want it's position. 1 Link to comment
Recommended Posts