Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
Aeleas

Car drifting ?

Question

Hi Guys

These days I'm working on car project. I could make it moving and turning with camera very well. but it doesn't give me a scene of realty. So, I search for a tutorial explain the sliding/drifting of a car. I didn't find any one for 3d project except one for 2D games. I copied the script file and transfer it to 3D. But got error. and i don't know if this will work or not :(. here is the script:

Please login or register to see this code.

 

If you have any other option please write it.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Since your using c#, you have to pass in a new vector and set one it's values:

 

rb.angularVelocity = new Vector3(rb.angularVelocity.x, Input.GetAxis("Horizontal") * tf, rb.angularVelocity.z);

  • Like 1

Share this post


Link to post
Share on other sites

  • 0
Please login or register to see this quote.

OK. How to solve it ?

Before i used "rb.AddForce". Yes, car is drifting but not that good. if I increased the speed I get nice long slide/drift but this mean i can't hit my target easily.

Please login or register to see this code.

000.png

red line is the car movement to hit target.

Edited by Aeleas

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Better than nothing.

Thank you Ocular.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...