ShayF2 Posted May 3, 2018 Share Posted May 3, 2018 I'm wondering what math I need to do camber effect to wheels, I need to set y rotation based off of x rotation, I'm just not sure how to do it. Can someone help me ? Debugscript Legend: INFO: rotation X : rotation Y : amount of camber Spoiler Link to comment
MIKI785 Posted May 3, 2018 Share Posted May 3, 2018 (edited) Is that screenshot yours? Or are you asking how to do that? If the latter then use setVehicleComponentRotation. Each wheel is a separate component that you may set a rotation for. Edit: I think I misread it, I can't help you with this then. Ignore me . Edited May 3, 2018 by MIKI785 Link to comment
ShayF2 Posted May 3, 2018 Author Share Posted May 3, 2018 5 hours ago, MIKI785 said: Is that screenshot yours? Or are you asking how to do that? If the latter then use setVehicleComponentRotation. Each wheel is a separate component that you may set a rotation for. Edit: I think I misread it, I can't help you with this then. Ignore me . That is my screenshot yes, but I can't just set y rotation it doesn't work, all the wheels wobble all over the place. I wanna know how to keep the camber and not have a wobbling wheel. What math do I need? Link to comment
AlexRazor Posted May 3, 2018 Share Posted May 3, 2018 You can update it really often(or you cant?) or you can try to make wheels with objects like wheels on NFS:SA server. Link to comment
ShayF2 Posted May 3, 2018 Author Share Posted May 3, 2018 If you look at how the front wheel is in the picture, that's how I want it, except when the wheel rotates on the x axis to spin, it messes everything up, like it did with the rear wheel. I do use objects for the wheels. I'm able to resize them that way. 4 minutes ago, AlexRazor said: You can update it really often(or you cant?) or you can try to make wheels with objects like wheels on NFS:SA server. I update it on every frame, the rotation of the wheel is set in render event. Link to comment
AlexRazor Posted May 3, 2018 Share Posted May 3, 2018 (edited) Then i cant undertand why it doesnt work(but probarly it needs some hard math). Have you tried to set some constant values of rotation? Edited May 3, 2018 by AlexRazor Link to comment
ShayF2 Posted May 3, 2018 Author Share Posted May 3, 2018 25 minutes ago, AlexRazor said: Then i cant undertand why it doesnt work(but probarly it needs some hard math). Have you tried to set some constant values of rotation? Well, if the x rotation was still, it wouldn't be a problem. So I'm guessing the math needs to be based off of the x rotation. I simply don't know what equation I need. Link to comment
Jayceon Posted May 3, 2018 Share Posted May 3, 2018 Use the setElementRotation with rotation order ZYX. Works very well for me. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now