Jump to content

car wheel rotation question


JeViCo

Recommended Posts

Posted

I can do 3D vehicle/object mods and basic scripts from scratch, contact me for free help!!
Skype/Discord/Telegram: [email protected] / Justin|X5|#0977 / @JustinX5
Xtreme 5 Gaming - COMING SOON!

I'd love it if more people in MTA utilized these amazing features, so please ask me anything related to 3D modeling/basic scripting/etc.
The expert knows more and more about less and less until they know everything about nothing.

Posted (edited)

You could get vehicle's rotation with getElementRotation function and set wheels' rotation with setVehicleComponentRotation for each frame in onClientRender event so wheels will stay straight relative to your vehicle.

Edited by NeverUnbeatable
Posted
9 hours ago, NeverUnbeatable said:

set wheels' rotation with setVehicleComponentRotation for each frame in onClientRender event so wheels will stay straight relative to your vehicle

i tried that. I also used onClientPreRender - same.

 

12 hours ago, Pirulax said:

Sure, you can create objects, and set their position according to getVehicleComponentPosition.

i've already maden that system. vehicleComponentRotation automatically changes after leaving the car.

Problem solved with onClientVehicleStartExit + onClientVehicleEnter + setElementData + some calculations

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