View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0008660||Multi Theft Auto : San Andreas||Scripting||public||2014-11-27 18:40||2014-12-31 23:15|
|Target Version||1.4.1||Fixed in Version||1.4.1|
|Summary||0008660: Ped matrices are not affected by rotation if the element is a ped or vehicle|
The matrix of a ped returned by built-in getElementMatrix function always returns a matrix which doesn't take in account Z rotation of the ped. It can be fixed by using a Lua workaround but I think that it should be fixed at source level for consistency.
|Steps To Reproduce|
Create a ped.
/crun Element.getByType("ped").rotation = Vector3(0, 0, 270)
This bug doesn't happen with players. I haven't tested other element types besides players, peds and vehicles.
|Tags||No tags attached.|
Okay, I tested more properly and it seems that this issue only occurs when recreating a matrix using Matrix() method, but in any element. However, this issue still makes it more difficult to reliably use matrices with procedural functions. From my point of view, this code should return a proper matrix from the matrix array, to made things simpler:
Because right now we have to do this to get a proper matrix, which is far more complicated:
/crun Matrix(Vector3(getElementPosition(getElementsByType("ped"))), Vector3(getElementRotation(getElementsByType("ped"))))
Similar problem with Vector3 as well:
@ccw's post, I noticed yesterday that: