I'm the one who asked for this tutorial, what can I say, you are awesome! thank you very much! definitely I'm going to steal your code and use it in my game, I'll give credit to you and recommend your channel, I really like when you make tutorials about technically tricky/difficult effects, like this rainbow or Celeste's hair, really cool! :)
@iaknihs
2 жыл бұрын
Thank you for the tutorial idea! Glad you are liking the videos
@androidgameplays4every13
Жыл бұрын
@@iaknihs Here you can see the implementation of the trail in my game prototype kzitem.infoqc5ofFtY9CE?feature=share
@RicardoFAlves-mp3cb
2 жыл бұрын
This was very inspiring, thanks!
@iaknihs
2 жыл бұрын
Very welcome, glad you like it!
@shoespeak
2 жыл бұрын
this is so useful! thanks!!
@rocket007
Жыл бұрын
great, now i can make smoke trails for my character that uses a roxket pack to fly around
@Pumpkinwaffle
2 жыл бұрын
Nice!
@nightcode3171
2 жыл бұрын
200 subs togo sir, keep it up 💯💯
@iaknihs
2 жыл бұрын
Getting close 😮 Thanks for watching ;)
@wademccall3903
4 ай бұрын
If the player is moving quickly there is another bug: all the other points are stationary while your point attached to the player is updated instantly, which causes a similar visual bug. I fixed this by updating all the points. Here is my final script: (Note: I attach this to the trail, not the player as seen in the tutorial. The player should be used as the "follow" field) extends Line2D @export var follow: Node2D var trailDelta: float = 0.0 var trailPointsPerSecond: float = 30.0 var maxTrailPoints: int = 20 var prevFramePosition: Vector2 var active: bool func activate(): clear_points() visible = true active = true func deactivate(): clear_points() visible = false active = false // Call activate() here if you want the trail to be active immediately func _ready(): clear_points() func _physics_process(delta): if active: trailDelta += delta if trailDelta > 1.0/trailPointsPerSecond: add_point(follow.position, len(points)) if len(points) > maxTrailPoints: remove_point(0) trailDelta = 0.0 else: var positionDelta = follow.position - prevFramePosition var i = 0 for point in points: point += positionDelta set_point_position(i, point) i+=1 prevFramePosition = follow.position
@wademccall3903
4 ай бұрын
actually maybe it has to do with my faster camera movement, idk...
@RikThunder33
2 жыл бұрын
This seems relatively simple even o.o I like
@iaknihs
2 жыл бұрын
I was hoping it would be. You can still apply shaders to the Trails for extra-fancy stuff, but it's great that a good effect is possible without any of that..
@jhonadejesus4681
2 жыл бұрын
How do i implement this with a flappy bird game. My player is stationary in the x.axis but the background/obstacles are the one moving. I tried this move_pos += 1 trail.add_point(global_position - move_pos, len(trail.points)) The trail is doing the flip effect that its supposed to do.
@codingboyblah
Жыл бұрын
can you please send this project
@wikzzorzgames1190
2 жыл бұрын
I've got an error and its saying that Too many arguments for rotate_sprite()" call.Expected at most 0
Пікірлер: 18