Raycast based tank suspension (Godot)

  Рет қаралды 24,689

Reason Not Found

Reason Not Found

Күн бұрын

I managed to create basic suspension using raycasting. It feels more practical then using rigidbody constrains. The lines are drawed using immediate rendering. I don't like anything physics related at all, as I have no idea how to model such things. The tank starts flying in all directions when it gets on the side (expected), but the whole game lags when my player character steps on it. I have no idea why. Also the performant physics engine (Bullet) makes this really unstable, so I had to us

Пікірлер: 48
@KaletheQuick
@KaletheQuick 3 жыл бұрын
Flying tanks? Well lets just surrender then.
@bodamat
@bodamat 3 жыл бұрын
Woolw, it looks amazing. I'm so interesting how this works :)
@reasonnotfound
@reasonnotfound 3 жыл бұрын
This one explains the basics of wheel raycasting pretty well: kzbin.info/www/bejne/rmGvhpx7ZcmrhpI I am slowly thinking about making some tutorials and stuff but university is pretty taxing right now unfortunatelly. :(
@bodamat
@bodamat 3 жыл бұрын
@@reasonnotfound understand :( Thank you for that. I'll wait for your tutorial too :)
@danibiyarslanov
@danibiyarslanov 6 ай бұрын
that camera movement adds a lot of character well done
@reasonnotfound
@reasonnotfound 6 ай бұрын
😎
@Gamepro5
@Gamepro5 6 ай бұрын
Prob cause it's physically attached to the part of the tank that wiggles
@LeSnekAuChocolat
@LeSnekAuChocolat 4 жыл бұрын
Can you make a tutorial how to do this? Would be really helpful 😁
@LeSnekAuChocolat
@LeSnekAuChocolat 4 жыл бұрын
@@reasonnotfound I mean every solution has its problems. If it works, it works :) I am just a newbie in godot and I know only the basics. So seeing how something like this works would be really helpful to me.
@LeSnekAuChocolat
@LeSnekAuChocolat 4 жыл бұрын
@@reasonnotfound Hmm, seems interesting, maybe ill try to make it myself using your solution.
@mast_g
@mast_g 4 жыл бұрын
@@reasonnotfound ...this helps too ;) gj
@bodamat
@bodamat 3 жыл бұрын
Yes, it would be great
@SaiponathGames
@SaiponathGames 3 жыл бұрын
Impressed on your work!! Nice!
@reasonnotfound
@reasonnotfound 3 жыл бұрын
Thank you :)
@reasonnotfound
@reasonnotfound 3 жыл бұрын
I wish you a lot of luck. ;)
@SaiponathGames
@SaiponathGames 3 жыл бұрын
@@reasonnotfound Thank you! Good luck! Waiting for next update!
@Artybayt
@Artybayt 8 ай бұрын
Good idea. Nice execution.
@coderflowerdev
@coderflowerdev Жыл бұрын
This is very cool!
@davidmurphy563
@davidmurphy563 3 жыл бұрын
Hey buddy, quick question if you don't mind: I see you used a Path for the tracks. Did you add a PathFollow with a MeshInstance child for each track segment? I see that the track moves with the suspension. How did you approach this? Did you vertically offset the track segment mesh or did you update the path each frame? ps. great work here, hats off to you.
@reasonnotfound
@reasonnotfound 3 жыл бұрын
Exactly. A lot of MeshInstances with PathFollow following a Path. I think there is somewhere a offset property, that offsets each PathFollow on the path.
@davidmurphy563
@davidmurphy563 3 жыл бұрын
@@reasonnotfound ok buddy, I can do that no problem. Obviously the curve changes with the suspension. You seem to be changing the track curve vertices each frame based on the wheel position. That's easy enough to code but isn't recalculating the curve each that super expensive?? Isn't the curve effectively baked?
@reasonnotfound
@reasonnotfound 3 жыл бұрын
@@davidmurphy563 I did not think about performance too much. I sort of expected that baking the path should not be a huge deal considering that the track uses only few points. (Did not test this though)
@davidmurphy563
@davidmurphy563 3 жыл бұрын
@@reasonnotfound Yeah, I think I'll take the "worry about it if and when it becomes an issue" approach. I will set all the vertices in one pass per frame though. Thanks so much for your help. Beautiful job with your tank.
@davidmurphy563
@davidmurphy563 3 жыл бұрын
@@reasonnotfound So you know, I implemented it and it's working great with no performance issues. Just want to thank you for your help.
@GameDevGeeks
@GameDevGeeks 6 ай бұрын
NICE
@atirutwattanamongkol8806
@atirutwattanamongkol8806 10 ай бұрын
War Thunder Godot edition when
@luiwolff3545
@luiwolff3545 3 жыл бұрын
can we get a tutorial or some code? would be very helpful!
@reasonnotfound
@reasonnotfound 3 жыл бұрын
I had problems myself with the solution. It's quite complex thing to make correctly.
@bodamat
@bodamat 3 жыл бұрын
@@reasonnotfound but it works :) This is interesting more how :)
@ThatPianoNoob
@ThatPianoNoob Жыл бұрын
@@bodamat not sure it does.. the fact that he doesnt move it forward makes me think it just works up and down. Which is cool but not very useful.
@batty251
@batty251 7 ай бұрын
This looks good however make another 10+ of these while other physics and other particles going off it all might bottleneck as recasting is all maths so it eats up memory quick.
@reasonnotfound
@reasonnotfound 7 ай бұрын
Not sure, I don't have the project files anymore. I had more then 10 of these use rigidbody for each moveable part, where parts were connected with constraint joints. I would be surprised if raycasted solution would struggle with performance.
@BitorBit_
@BitorBit_ 2 ай бұрын
Sourse code?
@GEK0dev
@GEK0dev Жыл бұрын
War thunder be like
@fedyfausto
@fedyfausto Жыл бұрын
There is some code?
@Gatfim.official
@Gatfim.official 7 ай бұрын
Sistema parecido com o war thunder mobile
@linovermac
@linovermac 8 ай бұрын
please project files and source codes github link :)
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 585 М.
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 8 МЛН
GIANT Gummy Worm Pt.6 #shorts
00:46
Mr DegrEE
Рет қаралды 77 МЛН
Adding some juicy driving to my game in GODOT
12:08
Deez Gamez
Рет қаралды 3,5 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,1 МЛН
How The Youngest WWII Soldier Ever Destroyed Everyone
20:14
ANIMATED LIFE LINES
Рет қаралды 360 М.
Training AI Bots to Fight (they started dancing)
15:06
cozmouz
Рет қаралды 278 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,5 МЛН
The Slope Iceberg Explained
27:17
Gingy
Рет қаралды 333 М.
Roblox Studio - Raycast Vehicle Suspension 2
9:30
Krokosha666
Рет қаралды 63 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН
The biggest lie in video games
15:18
AIA
Рет қаралды 1,9 МЛН
А ВЫ ЛЮБИТЕ ШКОЛУ?? #shorts
00:20
Паша Осадчий
Рет қаралды 8 МЛН