Home Unity

Simple Skidmark Setup for Your Unity Racing Game

polycounter lvl 15
Offline / Send Message
Polynurb polycounter lvl 15
This is a very simple tutorial on setting up skidmarks for any racing vehicle in your Unity projects. This method is independent of the type of vehicle or environment. It is also mobile friendly for your iOS or Android applications. The method I describe makes use of Unity's built-in WheelColliders and their "WheelHit" property. It also makes use of small Trailrenderers to render our tire tread marks behind the vehicle. As usual here is the link to the video, and don't forget the full source Unity project download link is in the video description! Enjoy.

[ame="http://www.youtube.com/watch?v=iCeNeKOsC2I"]Simple Skidmarks for Your Unity Racing Game - Unity Engine - YouTube[/ame]

Replies

  • PolyHertz
    Options
    Offline / Send Message
    PolyHertz polycount lvl 666
    I gave your tutorial a shot and it works well for the most part, but there are some problems.

    First, the Trail Renderer in Unity has no direct way to lay the trail flat and instead they all end up at an angle. Its not a big problem if the player never stops to look at them (or crashes and rolls back over them), and there's no other players to see them, but otherwise it's an issue that needs to be addressed.

    The other problem is that the moment the player stops skidding their skid marks disappear. They should fade out as the player stops skidding and then fade out gradually, anything else is going to be seen as a glitch by players.

    I don't have a ton of experience in Unity, so I could be completely wrong, but I'm not sure that these issues can be solved given what's accessible via the api.
  • Polynurb
    Options
    Offline / Send Message
    Polynurb polycounter lvl 15
    Good points. I think you're overthinking it though. I've looked at builds on an iPhone using this system and there's no way you could tell they don't lay flat...just too darned tiny on the screen. The issue of not fading out isn't jarring at all really. You'd have to see a build on a mobile device to see what I mean. If folks did think it was a glitch it's actually very simple to fade the material for the trailrenderer in and out. You' d script a change in the alpha channel using lerp or something. It didn't look glitchy to me on the phone so that's why I never considered to put that in the script. I'll update the script to add that functionality.
  • David Wakelin
    Options
    Offline / Send Message
    Hey Polynurb,

    I dont suppose you could me with a little bit of unity #c programming? Its basic code i'm just a little lost.

    Cheers

    =)
  • Polynurb
    Options
    Offline / Send Message
    Polynurb polycounter lvl 15
    @David - Well I think we could help each other. Contact me on Skype. I'm "jamesarndt" on there. We'll connect. If I can help you, please consider helping me too on my funding campaign for Super Kart Racing.
  • David Wakelin
    Options
    Offline / Send Message
    If you can help me do a few things; Ill guarantee to help fund your campaign.

    Edit:

    Before I skype you, let me finish my current code; then once the changes I need help with are made; I wont need to touch it.
  • Polynurb
    Options
    Offline / Send Message
    Polynurb polycounter lvl 15
    Okay that works for me.
  • David Wakelin
    Options
    Offline / Send Message
    I've come across another problem... again basic - if you know programming lol.

    I'm ready to message ya if you like :)
  • Polynurb
    Options
    Offline / Send Message
    Polynurb polycounter lvl 15
    Sure hit me up on Skype. I'll be on in about 5 minutes. Put in a contact request on there. I'll see if I am able to diagnose the issues.
  • David Wakelin
    Options
    Offline / Send Message
    Ok,

    well i'm about to setoff from Uni to Home. Itll take me about 10-15minutes; will you still be available?
  • Polynurb
    Options
    Offline / Send Message
    Polynurb polycounter lvl 15
    Yes sir. We'll talk then.
  • David Wakelin
    Options
    Offline / Send Message
    im back online :0
Sign In or Register to comment.