I’m a bike rider. I’m riding not only in the city, but on the racing tracks too.
And the main goal that I set for myself when I wrote this package is recreate the feeling of real motorcycle behavior.
All my riding experience included in this package.
Not only mathematical knowledge, but the thrill of riding a motorcycle and the behavior of bike in various situations.
Therefore, focusing on the motorcycle’s features in my package, you can see the realization of:
Wheelie
Stoppie
Two independent brakes(front and rear)
Highsides and lowsides
Trail braking(technique of cornering with a slight rear wheel skid)
Drift
The offset weight of the virtual pilot (for example, transferring the weight forward, you will not get unwanted wheelies when accelerating, shifting back will help you when motorcycle begins to perform stoppie).
I’ve focused on differences from the four wheels vehicle control, to two wheels bike perception.
Certainly, the keyboard controls is not same as controls by real wheelbar, and I found some golden edge, between stability and vice versa, which is typical for two-wheeled vehicles - the tendency to fall
However, if it does not meet your expectations, you have everything in your code to modify it as you wish.
For example there is my Unity4 project(same code as this one) where you may ride two bikes(sport and chopper). The code is same, differences only in settings. http://unitybike.ucoz.com/new_bike/Build.html
Thanks for reading.
Wait for any criticism and suggestions.
Its support for mobile control ? I has just test this, but its very difficult to control the motocycle follow the road, to turn left and right even if i use the keyboard. I the turn left or right and drift features is improve to the next update. I will buy this. I am also wish that with each new version, could you make a webplayer for the lastest version to test it first !
Hi, CoderPro.
I didn’t think to make mobile controls because it’s a little far than bike physics.
But I may try, it’s not hard.
About a stability - try full version for Unity4 and press “z” - activation of ESP. http://unitybike.ucoz.com/new_bike/Build.html
Is it better ?
Honestly, bikes not riding like that arcade style.
It’s more like Ford Focus behavior but… if you wish
I second the request for a web demo so prospective customers can test it out before they buy.
This looks like a nice pack. It really looks like you’ve considered a lot of things previous vehicle physic packs have not.
It looks very realistic - except for the crashes. I don’t know what it is but the bikes act too heavy when they crash. Especially at higher speeds, even at 40+ mph these bikes don’t just lay over and quickly stop when they are wrecked.
CodePro, it’s a sportbike. The drift on sportbike cannot be done without special improvement of bike geometry.
Any real life bike for drift have LONG pendulum.
Yes. But i thinks many people make game for mobile platforms. So its support for mobile sound good. Like tilt controller for bike…And could you add animated driver to this package ?
if I put a ragdoll on the bike it bends to the side (it there’s no ragdoll on it, it stands alright).
what can be done to stabilize it?
the ragdoll is 90kgs
You should use not ragdoll character when riding and keep ragdoll off before crash(SetActive(false) or something like that).
Turn it on when crash happens.
It’s general rule with all ragdolls for any projects.
for example, read this article “ACTIVATING RAGDOLL ON COLLISION”
yes, that is possible, but I think I’d like to keep it ragdoll at least for the first tests.
it is easier that way, but then might something come up which makes it not viable.
but thanks for the links and seems like it would work fine if collision and speed is calculated.
it is also possible to make it work with a lighter ragdoll (something like 10 kgs)
another question:
is it possible to drive in reverse or rather : pull the bike back a couple meters?
Hello, dibdab.
You should bear in mind what any rigidbody with weight changes center of mass whole motorcycle.
It’s vital for stabilization. So, I don’t recommend to attach any rigidbody to bike. Especially so high(bad effect to CoM).
Rear gear ? Easy: check bike speed.
If it’s zero, make a special keyboard key for that and change Enginepower to minus(-20hp I think is Ok).
(honestly, motorcycles don’t have rear gear(except very few models) that’s why I didn’t make it)
just wanted to draw your attention to a full body ik solution that is free.
it generates iK effectors runtime (with copy-paste can be saved as prefabs)
and that prefabs transforms position and rotation, after assigned, can be changed from code (if I’m not mistaken)