PLEASE make wheel collider rotation speed writable.

The inability to write directly to the rotation speed of wheels makes it impossible to properly implement a ‘rewind’ mechanic in our racing game, or to accurately teleport/reposition cars as needed. We’re constantly fighting or working around the tendency of teleported or rewound cars to lurch, slow down, or spear off to the side because we cannot instantly set the correct wheel rotation speed.

Thanks.

Good luck with that. While the functionality seems to be supported by PhysX (method setWheelRotationSpeed in PXVehicleWheelsDynData) Unity devs have very little interest on improving or modifying the WheelCollider. It took me 6 years to convince them to make WheelCollider.sprungMass writable. Essential features like being able to smoothly climb steps haven’t even been considered seriously, despite being available in PhysX for years.

I think we can do it actually. Would you be up for testing a custom build with the change? Anthony.

1 Like

YES

A thousand times yes.

Yes.

That would be fantastic.

Sorry for not replying sooner.

OK. I can make the custom build off any Unity release for the testing purposes, but the new API can only be released in what’s open for dev (2022.2 at the moment). Just saying. Anthony.

I completely understand. Let me see what the effects are of upgrading our project, and I’ll get back to you. Thanks again!

PS: I don’t wish to push my luck, but would there be the slightest chance of disabling the enforcement of Rect limits on Sprite.Create in the same custom build? It got added a few years ago and effectively ended development on a game I had on the app store. I knjow Unity had its reasons for introducing the limits, but I had been packing extra data into the values above 1.0 and filtering it out in the shader. When the limits went in, that was the end of that little trick. And, of course, the march of iOS, XCode and Unity versions then caught up and ended the whole project. I know it’s a lot to ask, but if it’s a case of commenting out a call to validate the rect…? :slight_smile:

I’m afraid the Sprite stuff would be off topic of this thread. Sorry.

Clarification: when you say 2022.2, is that currerntly available to download anywhere? Or would it be a case of getting a build of what we’re using, and then holding off updating until 2022.2 comes out to avoid losing the feature?

EDIT: I totally understand about the sprite stuff. It was a nice game while it lasted :slight_smile:

There’s a 2D forum for that. Unity is comprised of separate teams and features.

1 Like

A custom build is for non-production. It isn’t a way to get an early release of a feature. A custom build is no guarantee that it’ll land, it’s for testing with a view to it potentially being something we can then ship.

Then I’m happy to be a lab-rat. Cheers!

1 Like

Our current Unity version is 2020.3.16f1, but since this would only be a test anyway, and not rolled out to the rest of the team, I can download whichever version is most convenient.

1 Like

Hey @Peeling

Please find a custom build with the new WheelCollider.rotationSpeed property exposed here: https://beta.unity3d.com/download/8c7413d3e919/public_download.html

Note this property is in degrees per second, and won’t wake the vehicle up. It doesn’t appear to drive the vehicle forward either.

7965933--1021338--2cc532360fa29b0c6b9a5116e788a36d.gif

Find the sample project attached below too.

Appreciate if you could test this out and report all your findings. If the property proves useful, I can make it released in 2022.2.

CC @Edy , in case you have an opinion on this property.

Anthony

7965933–1021341–wheelc-angle.zip (39.4 KB)

2 Likes

Fantastic! I have some loose ends to tie up today for GDC but I will pull that build down in the meantime and test it out ASAP. Thanks!

1 Like

Any updates?

Hi - yes, sorry for the delay. Got shunted straight onto Switch optimisation after GDC :slight_smile: As far as I can tell, it’s working as hoped for. Thanks again!

EDIT: I haven’t had a chance to do an in-depth comparison between pre-and-post replay behaviour, but visually it seems closer.

So, concluding, do we think this is a useful API to expose in the end? I’d love to be confident it actually solves some problem for at least a single customer before delivering. Could we work together towards this, please? Thanks.

It’s definitely useful. It allows us to teleport cars, rewind and resume, and stop cars properly (eg when we put them on a podium at the end of a race, they don’t jiggle or twist because the wheels are still doing 200mph) :slight_smile:

EDIT: We will have to go back to hacking in workarounds for a while, at least, as we have had to move on to 2021 for various SKU reasons. Hopefully we can re-implement the changes using 2022 before we have to release.

Hey!

Would like to give an update on this. WheelCollider.rotationSpeed landed in Unity 2022.2.0a15! Thanks for bringing this up to us :slight_smile:

3 Likes

That’s fantastic :slight_smile: If the stars align we might be able to roll forward to a supported version prior to release. Thanks again!

1 Like