JCar script for 2 wheelers?

Can the Jcar script be modified to apply to vehicles with more or less wheels than 4? For example for a truck or motorcycle?

The lines 71-74 declare each of the 4 standard wheels as public transforms, is it simply a matter of declaring here as many (or as few) wheels as one needs in order for the script to work correctly?

In lines 220-227 Jaap clearly states “we use 4 wheels, but you can change that easily if neccesary”. However he only mentions about adding wheels, does this mean that the script will not work with less than 4?

I have extensively experimented and modified the above parts as explained, however I am getting mixed results and errors more often than not. It feels quite like stabbing in the dark at the moment. If anyone has had better success with this could you please share your experiences here and lend me some advice. Much appreciated :slight_smile: I really feel this script is very powerful, however I have only managed to find one tutorial online on how to use it properly. Hopefully someone else has had more success than me.

For a bike setup this could be done quite easily. You’d have to add additional stabilizers to the rigidbody though or trigger some sort of crash event when the bike tilt is over a certain limit. Otherwise once your bike tilts in the first turn it will be stuck in tilt! You can use a 4 wheel setup but move the wheels close together, or for a better visual effect make the two wheels on one side very thin and turn off there mesh renderer. The Jcar script should take care of the rest, wheelies and other good things included!