MX Bikes Official Forum

General Category => Suggestions and wishlist => Topic started by: Paulo Rodrigues | Motocross Plays on October 03, 2014, 07:10:17 PM

Title: Whip concept for PiBoSo
Post by: Paulo Rodrigues | Motocross Plays on October 03, 2014, 07:10:17 PM
Hello PiB, A person can do the whip and bring back because of the friction of the wind on the bike, I know it's impossible to simulate a perfect air friction in a game because I'm also a developer, but I've algorithms that simulates this "natural force".

I leave here a pseudo code to get you thinking:
if (!bike.isGrounded){
    if(bike.transform.angles.x > 0){
        "add a smooth angular force for the bike return to 0x";
        var coeficient = ReturnDampingForce * Axis Input;
        theAngularForceX = coeficient;
    else if(bike.transform.angles.x < 0){
        "add a smooth angular force for the bike return to 0x to";
        var coeficient = ReturnDampingForce * Axis Input;
        theAngularForceX = coeficient;
    }
}


This is super super simple and this code is just for X angle, you can do the same thing for the Z and Y axis.
Well this will be like a "Rider Reflex Whip" but a valid code...

Have other option to, like the gyroscopic wobble theory (Mx Simulator Myths), but i'm not good physic thinker...
(http://images.encyclopedia.com/utility/image.aspx?id=2795776&imagetype=Hero)

I'm creating a dirt bike simulator for Android, nothing special, simple physics and also trouble'm going to think of some method of performing whips.
And also I'm having trouble setting a caster angle of the handlebars to the bike always stay standing, if you can give me a hint how can I create this "angle" I would be very grateful as well.
Title: Re: Whip concept for PiBoSo
Post by: PiBoSo on October 04, 2014, 07:53:46 PM
Quote from: Paulo Rodrigues on October 03, 2014, 07:10:17 PM
Hello PiB, A person can do the whip and bring back because of the friction of the wind on the bike, I know it's impossible to simulate a perfect air friction in a game because I'm also a developer, but I've algorithms that simulates this "natural force".

Thank you for the tip.
The effect of air drag has been greatly underestimated, because velocity didn't seem high enough.
With more realistic aerodynamic parameters there is a remarkable self-aligning behaviour during jumps.
Title: Re: Whip concept for PiBoSo
Post by: acr21 on October 04, 2014, 08:35:14 PM
This sounds very promising.
Title: Re: Whip concept for PiBoSo
Post by: 𝖙𝖋𝖈 on October 05, 2014, 01:09:27 AM
Good news, hope to see it in action soon!