Pollo

Camber

Recommended Posts

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

kdfMj65.jpg

 

Share this post


Link to post

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 by MIKI785

Share this post


Link to post
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?

Share this post


Link to post

You can update it really often(or you cant?) or you can try to make wheels with objects like wheels on NFS:SA server.

Share this post


Link to post

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.

Share this post


Link to post

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 by AlexRazor

Share this post


Link to post
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.

Share this post


Link to post

Use the setElementRotation with rotation order ZYX. Works very well for me.

Share this post


Link to post

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.