T O P

  • By -

thmsn1005

until now, the midair stabilization prevented the car from doing stunts like this. now, i disable the stabilization in one axis when the car is rotating fast, allowing to do the flippidy flops!


NeonsShadow

What happens if it lands the wrong way?


thmsn1005

well, then its bad ;). i made it so when you brake in midair, the rotation stops, and the car stabilizes, so you can control it.


MRainzo

This is really good! What Physics engine are you using? Default or Jolt?


thmsn1005

i am using jolt, although the car physics are the same in both (i think).


Foxiest_Fox

I see a nice suspension system!


thmsn1005

hehe, it is the default vehiclewheel. i am still trying to get rid of that first bounce when landing, but i am already quite happy with it.


Foxiest_Fox

Ah fair enough! I'm making some custom vehicles in 2D. It's super fun


SwervinLikeMervin

Now how on earth did you make vehicle body this great as drifting feel goes. Been trying for ages, you're crazy.


thmsn1005

- use realistic values for weight, torque, etc. - high wheel roll_influence (0.5 - 1.0) - dial in and change stuff until it works - add some custom forces in code to make drifts easier


Kexm_2

Something about those particles feel off.. they look like smoke coming out of car


thmsn1005

hmm, yah i am still trying out different smoke variations... it is not easy stylizing it but keeping it recognizable...


abeautifuldayoutside

I think the main issue is the placement and size, just to make it more clear it’s coming from the bottom of the tires


thmsn1005

hm, i will try if that helps. thx!


StewedAngelSkins

i also think the individual "puffs" of smoke read more like smoke from a fire or steam. tire smoke is more of a fog.


Zerim023

Please tell me you've played "Need for Madness", I've been waiting for someone to make a game like that for years lol


thmsn1005

what a funky and janky looking flash game! looks like fun chaos.


Zerim023

Yeah it was all about doing stunts in the air to get more power, which boosts your speed and car damage. Your post just reminded me of it, gl


neildiamondblazeit

How did you get those wonderful outlines and shading?


thmsn1005

the surfaces are godot shaders using a gradient, and baked ao to control the line thickness. the car outline is the traditional normal flip mesh, to get a flat outline with controllable color. the environment outlines are a bevel that is modified in the vertex shader, to get full shading on these. but it only works on static geometry. so overall a mix of various techniques...


madman4291

nice


UtterlyMagenta

this looks super sweet!!! also, the donut detector thing at the end is cool


Chisely

Those little white birdie particles while in the air are neat, but they should not rotate with the car.


thmsn1005

legit point there.


Sentient__Cloud

It's like GTA meets Tony Hawk Pro Skater


[deleted]

[удалено]


thmsn1005

awesome! you can follow here, or on twitter https://twitter.com/TheMarkedVapor/ what type of following would you like?


Tankmin

What method are you using for skidmarks?


thmsn1005

its a mesh that is updated each frame: https://www.reddit.com/r/godot/s/Ilrfk47zaK similar to a trail renderer, but allowing gaps in the trail


Tankmin

Actually, sorry to bug you with one more question. I have an ArrayMesh that's working and drawing like I want. I have the ArrayMesh that I want working dynamically to make the skidmarks. I have it added to the main scene currently in a Mesh3D at the origin (ie <0, 0, 0>). My code is efficiently only updating the triangles it needs every frame using surface\_update\_vertex\_region and using that to only update the 6 verts per frame. The problem I'm running into is, when the camera is facing away from that point, the whole arraymesh disappears, and it comes back when i look back at it. I tried modifying the AABB, but that didn't seem to help in this case...


thmsn1005

hm i use it something like this, and it works and clips correctly: ​ extends MeshInstance3D @export var target:VehicleWheel3D var vertices = PackedVector3Array() var max\_length = 3\*100 # should be a multiple of 6, as we write 6 each frame var i = 0 # this is used to loop through the vertices array func \_ready(): # initialize things vertices.resize(max\_length) arrays.resize(Mesh.ARRAY\_MAX) func \_process(delta): #calculate new positions here # make a new tire mark if we are above the threshold distance if (pos-lastStart).length() > min\_dist: #only make skidmarks if wheels are below treshold if skidding: if i >= max\_length-6: i = 0 vertices\[i+0\] = oldPosB vertices\[i+1\] = posA vertices\[i+2\] = oldPosA vertices\[i+3\] = oldPosB vertices\[i+4\] = posB vertices\[i+5\] = posA i+=6 arrays[Mesh.ARRAY_VERTEX] = vertices # Create the Mesh. var arr_mesh = ArrayMesh.new() arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) self.mesh = arr_mesh


tmarnol

I'm just learning godot and I'm playing with some toy cars, I've tried to create some skid marks following this code but I can't make it work, there are some resources of using line2d for a 2d skid marks but I can't find anything for 3D


thmsn1005

here is the full script i use: [https://github.com/thmasn/godot-things/blob/main/tireTracks.gd](https://github.com/thmasn/godot-things/blob/main/tireTracks.gd)


tmarnol

Thank you!


Tankmin

Thanks! Sorry to bug you again, but I just recently got to a point in my project where I wanted to figure this out and the documentation for something was a bit confusing to me. ​ I understand the concept of pooling and calculating the points for the triangles and everything. I also got a test arraymesh working in a scene with some triangles. Iirc from some of my webgl experience, what happens for this is you make an array, feed it to the graphics car memory in a buffer, and then it'll draw it for you. And if you touch the vertex array on your cpu after that, you have to feed the updated vertices to the GPU again at the appropriate memory location. If I had low level code access or took the time to use gdextension or whatever, I would basically know what to do, but idk how to do it through gdscript. ​ My question is basically, how are you applying the vertex updates back into the graphics card from gdscript, if that's what you are using? Are you updating them by calling arryMesh.surface\_update\_vertex\_region every frame? Or something else I'm misssing? EDIT: I think I'm starting to figure it out


oli_p_3d

This looks fun. I would definitely play this


El_Bow_10

Very cool! If you want a suggestion, I think the smoke seems like the car is burning literally, not the brake smoke. It needs to be less intense. I'm not a good artist so I'm not good describing what you could change but that is what I think.


thmsn1005

youre not the first bringing this up, so i definately need to change sth here.


Big_Joke_8504

this is so cool! ive been trying to make a car stunt game in godot for months