• Welcome to MX Bikes Official Forum. Please login or sign up.
 
April 26, 2024, 03:02:39 AM

News:

MX Bikes beta18j available! :)


Whip concept for PiBoSo

Started by Paulo Rodrigues | Motocross Plays, October 03, 2014, 07:10:17 PM

Previous topic - Next topic

Paulo Rodrigues | Motocross Plays

October 03, 2014, 07:10:17 PM Last Edit: October 03, 2014, 07:12:39 PM by Paulo Rodrigues
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...


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.
Specs:
- AMD Ryzen 7 3700X
- GeForce RTX 2070 Super 8GB
- 16GB DDR4 TeamGroup El
http://www.youtube.com/motocrossplays


PiBoSo

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.

acr21


𝖙𝖋𝖈

Good news, hope to see it in action soon!