Jump to content

Vehicle parts rotation


Daniels69

Recommended Posts

Posted (edited)

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
Posted
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.

Posted (edited)

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
  • 1 month later...
Posted

i have seen this in many servers, you can do it some how , in the start i thought its some custom object which was put on the car, but then i saw the same on default gta sa cars too , so maybe some one knows how to do this?

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...