Search Unity

[RELEASED] Simple Bicycle Physics

Discussion in 'Assets and Asset Store' started by AiKodex, Feb 2, 2022.

  1. John3D

    John3D

    Joined:
    Mar 7, 2014
    Posts:
    441
    Hi @Xpert3D ,

    If the biker crosses a finish line how would you make the biker stop from code, please?

    Many thanks in advance!!!

    Kind Regards,
    John
     
  2. AiKodex

    AiKodex

    Joined:
    Jan 21, 2021
    Posts:
    354
    Hello John,

    The easiest and the simplest solution would be to disable the script BicycleController.cs and increase the drag on the RigidBody component. A drag value of 20 or more will be effective.

    This will cause the bicycle to disengage with the controls while still keeping IK intact for the cyclist to put their foot down once the bicycle has stopped.
     
    John3D likes this.
  3. Rastar

    Rastar

    Joined:
    Sep 14, 2012
    Posts:
    73
    HI, thanks fo rthe info, will take a look. However, the approach for moving the bicycle when using an external trainer is probably somewhat different: You'll take either the current speed or power from the trainer and use that to either directly set the bike's velocity, or apply a force to it. Pedaling will just be an animation whose play speed is controlled by the measured cadence.
     
  4. John3D

    John3D

    Joined:
    Mar 7, 2014
    Posts:
    441
    It worked! Thanks!
     
    AiKodex likes this.
  5. John3D

    John3D

    Joined:
    Mar 7, 2014
    Posts:
    441
    Hi @Xpert3D ,

    Any plans for releasing a new update, please?
    I would love to see gyroscope for Left/Right movement.
    A change camera button would be nice: a simple way to have the main camera be parented in some empty game objects in order to provide multiple view angles like: wheel position, chest position, helmet position, top view, just to name a few. The button would just cycle through the predefined list.

    Thanks!
     
  6. AiKodex

    AiKodex

    Joined:
    Jan 21, 2021
    Posts:
    354
    Hello John,

    Thank you for your suggestions on what we could add to make the asset richer in terms of quality.
    We'd highly recommend handling camera's through the Cinemachine package by Unity. It offers next level control on cameras. You can implement any camera angle at any position along with settings like collision detection for the camera which could be useful especially while dealing with dynamic fast paced world scenes.
     
    John3D likes this.
  7. John3D

    John3D

    Joined:
    Mar 7, 2014
    Posts:
    441
    Thanks for your reply!
    I find your recommendation to utilize the Cinemachine package by Unity particularly interesting, as it indeed promises significant enhancements in camera control.
    However, I must confess, I am not yet entirely familiar with the process of implementing Cinemachine in my project.

    I wonder if you could assist me further by providing some guidance or resources that can help me better understand how to use Cinemachine with Simple Bicycle Physics?

    Your assistance would be greatly appreciated as it would not only help enhance my project (90% complete now) but also help others that have bought your very nice asset!


    Thank you once again for your valuable input and in advance for any guidance you can provide. Looking forward to hearing from you soon.

    Best Regards,
    John
     
  8. unity_t1N5M9EGrmR-lg

    unity_t1N5M9EGrmR-lg

    Joined:
    Jun 22, 2023
    Posts:
    1
    how do i make her bend more in the curves?
     
  9. SAMYTHEBIGJUICY

    SAMYTHEBIGJUICY

    Joined:
    Jul 12, 2023
    Posts:
    45
    Hey - trying this forum as I'm not getting replies on the emails or the enquiry form on the site. Has anyone tried the mixamo mapping recently using the extension? I can't get it to work after following both the original tutorial and mapping everything manually and even using Rowlan's extension. Whenever sprint is activated the spine falls through the floor and there is an error on the left foot mapping.

    I also have been trying to get a response on the best way to modify the input controls from the getkey/axis inputs to let's say just a regular calculated speed float that might come out of a trainer. The asset is described as "trainer ready" but I can't see the logic by which I might implement this. Would really appreciate some guidance.
     
  10. AiKodex

    AiKodex

    Joined:
    Jan 21, 2021
    Posts:
    354
    Hello,

    Thank you for reaching out to us here. We have been having a few issues with our mailer recently. If you could send us your email, we'd be able to reach out to you via another address.

    Please could you tell us if you are using a mixamo rig and have set it to humaoid? This is the most common error faced by developers.

    You can look into the CustomInput() and the ApplyCustomInput() function (in the ApplyCustomInput function, lines 406 and 407 depending on the version of the asset) in the BicycleController.cs script. You can pass your sensor input instead of the getaxis variables of the trainer directly. You may also control the speed of the bicycle programmatically by changing the acceleration curve of the bicycle.

    Hope this information helps.
     
  11. AiKodex

    AiKodex

    Joined:
    Jan 21, 2021
    Posts:
    354
    Thank you for attaching the screenshots.

    You mentioned you have tried the Mixamo auto rigger to obtain Mixamo rigs. That usually works flawlessly with the asset. The mappings you show makes it seem like rig differences is causing this.

    Have you tried manually assigning the values? Have you had any troubles with that?
     
  12. SAMYTHEBIGJUICY

    SAMYTHEBIGJUICY

    Joined:
    Jul 12, 2023
    Posts:
    45
    Hey AiKodex - thanks so much again for replying. I found the issue! After applying the "Setup Selected" from the toolbar there seems to be a slight bug where the right foot IK target never gets mapped in the anime controller script. I wanted to share this here in case other people encounter it. Hope this helps someone.

    upload_2023-8-22_23-36-54.png

    Also I saw earlier in the forum you said that you sent detailed instructions to one query on how to change to a new rigged bicycle. Would you please also send these to me at skjbukowski@gmail.com I would really appreciate it!
     
  13. AiKodex

    AiKodex

    Joined:
    Jan 21, 2021
    Posts:
    354
    Perfect! We're glad it works now for you.
    Sure, we have emailed you the guide for changing bicycles. Please do note that it is a bit more involved because of small parts like pedals and crank of a bicycle that need to be physically animated.
     
    SAMYTHEBIGJUICY likes this.
  14. charlestango

    charlestango

    Joined:
    Jun 7, 2022
    Posts:
    1
    I just bought this asset and it's GREAT! We're working on adding this to our open world platform to let players ride the bike in our city. We're using Mirror networking for our open world platform so we're working on getting Simple Bicycle Physics to work with Mirror.

    I see from an earlier message that you're looking into developing a multiplayer add-on for this asset. Any luck in getting this done? I'd love to buy an additional multiplayer add-on especially if it uses Mirror networking.

    While working on making this play nice with Mirror, we're running into some weird issues where Mirror's physics is clashing with the physics in this asset. The bike's sliding when turning.

     
  15. NeverSphere

    NeverSphere

    Joined:
    Sep 13, 2023
    Posts:
    1
    hey, I was recording for the waypoint on vsync on and frame increment is set on 2 and when i load and played it it always first skips first part of the track and then go slowly to destination. if I increase frame count then it starts glitching and turns are everthing got worse.

    I solved it was my code problem
     
    Last edited: Sep 21, 2023
  16. UnityCyclist

    UnityCyclist

    Joined:
    May 11, 2020
    Posts:
    1
    Is there a way to make the cyclist move along a predefined path such a spline? I looked at the waypoint system but that appears to only work with pre-recorded movements.

    Thanks in advance.
     
    Last edited: Dec 8, 2023
  17. touee

    touee

    Joined:
    Dec 5, 2023
    Posts:
    1
    I just downloaded and tried Simple Bicycle Pro, It was simple to use and I have much fun playing through the examples.
    Unfortunately, I'm looking into implementing drifting into our upcoming bicycle game.

    Currently, If the player ride at faster speed and then started turning,
    I try to set below properties dynamically
    F friction (X : 0.45, y : 0.45)
    R Friction (X : 0.15, y : 0.15)
    to simulate drifting.
    So the bicycle got sliding property but problem now I can't get bicycle to turn quite right or is out of control.

    Do you have any example on drifting using Simple Bicycle Pro ?
    I'm not sure what property or code should I change to implement proper drifting.

    Thanks.
     
  18. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    214
    Hello,Is it Home trainer ready for Wahoo kickr and others ?
    It is only mentionned in the trailer video that it support home trainer.
     
  19. MeganPein

    MeganPein

    Joined:
    Sep 18, 2023
    Posts:
    2
    Hi, may I know if there is like a tutorial video on how to use this asset. Thanks.
     
  20. johnfernow

    johnfernow

    Joined:
    May 31, 2018
    Posts:
    2
    Anyone know what asset(s) are used in the video on the product page? I'd love to have an obstacle course like that for a minigame in a project I'm working on.

    I'd use custom shaders and post-processing, probably replace some of the models and textures, and of course customize the track layout, but having something to start with would speed up the process of creating it significantly.
     
  21. MeganPein

    MeganPein

    Joined:
    Sep 18, 2023
    Posts:
    2
    Hi, I am creating a bicycle simulator using the bicycles provided by Simple Bicycle Physics. May I know if it is possible to connect the WAHOO smart trainer to the bicycle in Unity 3D and how it can be done? This is so that the user can control the on-screen bicycle. Thanks.
     
  22. rakib-gameloops

    rakib-gameloops

    Joined:
    Sep 11, 2020
    Posts:
    1
    Hi,
    Is it possible to make something like this with your asset? We want to keep a fixed path like in the video but let the user have control of the speed
     
  23. Eradali

    Eradali

    Joined:
    Jun 24, 2020
    Posts:
    2
    Hello, where I can buy the tracks/environments you showed in your Simple Bicycle Physics? They look really amazing.
     
  24. VoltDriver

    VoltDriver

    Joined:
    Nov 16, 2019
    Posts:
    8
    Greetings! I have bought your asset and am trying to use it in our racing game. I am encountering some issues.

    I have trouble making the Mountain Bike turn at high speeds. The top speed for our players can reach 50, or 60 on the BicycleController and then the turning is way too realistic and makes the controls feel less responsive. Is there a way I could facilitate the turning, such that it feels more arcade-like?

    Thank you!
     
  25. jefrezicus

    jefrezicus

    Joined:
    Sep 13, 2023
    Posts:
    1
    Hello! I couldn't find the guidance for the FPV view? Is that available or did I miss it in the directions somewhere?
     
  26. AiKodex

    AiKodex

    Joined:
    Jan 21, 2021
    Posts:
    354
    Hey VoltDriver,

    There are some wheel friction settings in the bicycle controller inspector window. Dropping them to 0.5 each could help introduce the “slipping” while turning. The bicycle will drift more the lower you go. You can even change friction settings for different types of terrains or for different speeds.
     
  27. AiKodex

    AiKodex

    Joined:
    Jan 21, 2021
    Posts:
    354
    Hello jefrezicus,

    The FPV is available in one of the demos, specifically in the “Basic Setup” folder right at the end. You can even make the camera the child of the “Head” bone of the cyclist.Adjust the camera to have the 0,0,0 location with the head bone and your camera will then follow along with the head essentially acting like “eyes” or a GoPro.
     
  28. VoltDriver

    VoltDriver

    Joined:
    Nov 16, 2019
    Posts:
    8
    Hello! Thank you, modifying the Wheel friction does indeed have a great impact on the way the bike handles. I think with more tweaks I could get what i want out of it.

    Thanks!
     
  29. AiKodex

    AiKodex

    Joined:
    Jan 21, 2021
    Posts:
    354
    Hello VoltDriver,

    Happy to help!