Jump to content

Vehicle parts rotation


Daniels69

Recommended Posts

Hello dear mtasa community, i have found an issue , i can't really set vehicle wheel rotation with setVehicleComponentRotation, they just don't rotate, other components do.. 
Some one knows where is the problem?

 

--wheel_rb_dummy
addEventHandler("onClientVehicleEnter", getRootElement(),
    function()
        local theVeh = getPedOccupiedVehicle(localPlayer)
        if (theVeh) then
            local rx, ry, rz = getVehicleComponentRotation(theVeh, "wheel_rb_dummy") --get the rotation of the component
                setVehicleComponentRotation(theVeh, "wheel_rb_dummy", rx, ry+10, rz)       
        end
    end
)

 

Edited by Daniels69
Link to comment
3 hours ago, Daniels69 said:

Hello dear mtasa community, i have found an issue , i can't really set vehicle wheel rotation with setVehicleComponentRotation, they just don't rotate, other components do.. 
Some one knows where is the problem?

 


--wheel_rb_dummy
addEventHandler("onClientVehicleEnter", getRootElement(),
    function()
        local theVeh = getPedOccupiedVehicle(localPlayer)
        if (theVeh) then
            local rx, ry, rz = getVehicleComponentRotation(theVeh, "wheel_rb_dummy") --get the rotation of the component
                setVehicleComponentRotation(theVeh, "wheel_rb_dummy", rx, ry+10, rz)       
        end
    end
)

Use setVehicleHandling to rotate the wheels.

Link to comment

As far as I'm aware you can not rotate the wheels by using setVehicleHandling. I would believe the wheels are managed by the engine and as such you can't really modify them.

Maybe this is something that could be added as a feature request, I'm guessing it should be possible since the water riding cheat modifies the wheel rotation.

Edited by Dealman
Link to comment
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...