Making a simple drift effect

Hello all. I cannot figure out how to create a drift effect for a race game. There are plenty of people on youtube who put up the drift effects they achieved, but there are no tutorials that I can find. If any body has any tips advice or tutorials I need some Help!!!

thx

Edit:
All i want is for the cameras tracking to the car object to lag behind, just a little.

the game!


Hi,

If you wanted smoke for drifting, you could try checking out the easyEmit addon for Blender https://www.youtube.com/watch?v=tovhSKqJ7vw and play with the settings (setting particle colors to gray, for example).

Then in code, you could toggle the emitters for your smoke on and off depending on how the car moved (I think the property to toggle is called ‘emitteron’ in the example I have provided). One of the drawbacks of the addon (as far as I know) is adding too much particles can affect your game speed, but that’s where you can compromise by adding fewer particles.

You can even create sparks for your car with easyEmit (shown here).

It also wouldn’t hurt to look into animated smoke textures (which you can fade in and out in code) and custom smoke animations to attach to your car. I guess what I’m saying is, a good solution to creating a drifting effect is to attach smoke to your car which can be controlled. If you want to know where/how to add the smoke to your car, you can take a look at where games place the smoke or sparks for car drifting.

Hope this gives you at least a general idea.

@Mirror
i think he means the Logic Bricks / Python behind it. Not the particles

Edit:
If you mean the Logic, you would have to always move the car with Linear Velocity, and when drifting you change the Linear Velocity minimally but let the car rotate more i guess

Are you using the vehicle wrapper?

demo:Visual VehicleWrapper

it has drifting ability already

Oh, thank you for bringing that up Lera. Though I suppose he meant ‘fundamentally everything to do with car drifting.’

I suppose for the logic aspect, this demonstration may be useful (check the download link).
You can take a look at and experiment with the functions (notably _powertrain() and _steer(), as these alone in the main function can implement skidding or drifting with proper initialization). Please note the script for the car is designed for a car body and 4 tires.

EDIT: Here’s something of a tutorial for that script (car suspension):

Thank you all. I really appreciate the feed back you can get on this forum.
I am using a setup where the camera is parented directly to the car. What I think I want is for the cameras tracking to the vehicle to lag just a little so that we see the sides of the car when we turn hard. Currently the camera does not move from its parented point.

Any thoughts on how i might achieve this?
Thanks again.

Edit:
i’m pretty new to the logic bricks. and not very skilled programmer. I think general direction will suffice though.

smoke is an interesting idea. I will definitely(and have… sort of) set it up in the future but for now i need the basic drift look(the camera should lag just a little from the car. So the car spins out without the camera tracking perfectly to the vehicle.

This is pretty good. In the drift demo you can see how the camera lags slightly behind the cars movement. I should have been clearer in my original post, butt… if i can just get this “Camera lags behind the rotation and location of the car” effect, I think i can figure the rest out…

Thanks!

Edit:
The tutorial is really good. This might be it.

Edit again:
so i have the driving set up how i want it. Now what i need is for the camera to lag behind the cars moment.

No, i am not using the vehicle wrapper. It looks pretty powerful though.

This is an amazing Game i love the Graphics bro don’t worry too much about drifting ive also designed a drifting system which i havent shown yet because its not perfect im trying to perfect it be4 i show it. my cars drift nicely but some physics struggle to keep my vehicles going fast and at the sametime players can turn as they wush instead with mines the car overslipps and the car is diffucult to control. Anyways nice car game i must say if yr making a car game i support it go for it man make it a very very good blender Game, blender needs games that look AAA and perform like AAA titles. ( but 100% well optimized)

On drifting physics you need to add tire friction and a collision sensor to the Ground and the wheels be sure to give the ground properties as well man. However on the scripting side of things u need to really ace up on how the car turns and how the car gets affected to the physics and lastly be sure to optimize your scripts and as well as the world its self i wish you all the best man keep up the Good work i’d like to play yr racing game i love car games man.

Fred/K.S

Thank you. Inspiring to know the game looks fun. It will end up being a multi player. Or single player. I have only been working on it for a day.

Mabey ill put it up on this website when its done!
thx

Im already hyped !!! Cant wait any longer bro.
I think multiplayer would be a good option since they aren’t that many blender online games anyways a singleplayer would be the best option in this case. Otherwise work hard on your optimization its what will get you far with the Blender Game Engine. (And in any case its what has helped me get this far and so as everyone else)

Fred/K.S

Thanks Fred/K.S

Camera Lagging Behind:

Select the Camera, Go to thing next to world, Scroll down to “Relations Extras” - Slow Parent to 50 or smt


[QUOTE=Leralasss;3226837]Camera Lagging Behind:

Select the Camera, Go to thing next to world, Scroll down to “Relations Extras” - Slow Parent to 50 or smt

/QUOTE]

HALLELUJAH!!! this is the effect i was looking for! I cannot believe i didn’t see this. Thank you one hundred billion times!
Its awesome, seems a little glitchey though. is there any other way to achieve a similar effect that is less “Glitchey or jumpy”. If not no worries. Very happy to find this!

THANK YOU MUCH.

p.s.
Cool game, by the way.

@like
thanks for checking out my game xd

if you think the slow Parent is a bit glitchy you could always make your own script for it :stuck_out_tongue:

@like
Hi,

Thanks for the feedback! And yes, your game is looking promising.
Here’s a way to make the camera follow an empty parented to the car that offers some control.


(This logic setup should be attached to the camera, and the camera should be parented to the empty.)

@Lera
Thank you Lera for sharing that relations extra method, I never even knew that option was there.

@MirrorirorriM
Thank you this is very help full. I found out that my game was just glitchey cuz i had some massive textures loaded in for some reason. Anyways, the logic block set up is very cool (and simple).

It seems really smooth, I like it.

I will try to get the multiplayer version of the game up eventually. However, life happens and if i cant get the multiplayer version up i will put up the game as it is, some time soon.
Thanks a million for the amazing feedback it really is great to have an active community.

I thought you might like to see how i added some light effects to the break lights and the sun.


I parented in image, set to add(this option is under the material settings), to the back of the vehicle(break lights) and to a single vertex in the center of the car object(the sun flare. or whatever its called)

thx.
Like.

EDIT:
If anybody has suggestions of things i could do to make this racing game really cool and unique, post away. I would love to hear your thoughts.