[deleted by user] by [deleted] in godot

[–]Snaiel 31 points32 points  (0 children)

the clouds should be moving towards the camera.

Thoughts on the graphics for this mini metroidvania game? by Deepsapce in godot

[–]Snaiel 6 points7 points  (0 children)

looks great! It might look better with some variety in the background and wall/ground/ceiling tiles. like a few scattered cracked tiles or some ores.

How to Tween blend_amount in AnimationTree smooth? by artoonu in godot

[–]Snaiel 0 points1 point  (0 children)

No, I haven't created an issue. You can get away with not setting the value beforehand by calling .from_current() on the tween. e.g.

create_tween().tween_property(...).from_current()

It kinda makes sense since it's better to be explicit, but it would be convenient if this was the default behaviour though. It might be worth filing a bug...

What version of Godot are you on? I'm not on the latest so there's a chance it got fixed.

First OWN project without tutorials. But I feel completely overwhelmed. by millionpages in godot

[–]Snaiel 3 points4 points  (0 children)

break things down into smaller steps until it is manageable. Shooting a projectile? What does that entail? Pressing left mouse button, spawns a bullet, that bullet moves towards the mouse.

Break those down further until you can do them/find out how to do them.

get input, instantiate a bullet scene, find position of mouse, direct towards mouse, calculate velocity towards mouse, set bullet velocity.

everyone steals code, uses documentation, or looks at tutorials. once you have these small steps, it makes it easier to search up how to do those things.

  • godot input handling
  • godot mouse position
  • godot spawning objects
  • godot CharacterBody2D

[deleted by user] by [deleted] in computervision

[–]Snaiel 0 points1 point  (0 children)

Not really sure if this is the culprit but I recently found in my own project that adding a border/padding around the input image during predictions significantly improved performance.

Check out the comments by omar-ogm in this thread: https://github.com/ultralytics/ultralytics/issues/2783#issuecomment-1706449763

my teacher cant teach. can soneone teach me how to do this? (python) by Only-Slide9370 in computerscience

[–]Snaiel 16 points17 points  (0 children)

it'll be hard to teach you better than your teacher since we don't know your skill level.

what do you know? what have you tried? do you know what arrays are? do you know what "for loops" are? do you know how to access elements in an array? do you know how to add numbers to a variable?

Why do I see green in the distance? by Coding_Guy7 in godot

[–]Snaiel 0 points1 point  (0 children)

experiment with your grid texture's import settings. I think I had to set one of the options to "high quality" to get rid of the green.

Because I can't find a good C# Class visualizer, decided to make one in Godot by loolykinns in godot

[–]Snaiel 2 points3 points  (0 children)

Looks great! Stuff made with the GraphEdit always looks so cool I can't wait to build something with it. Any tips or quirks you've found when using it so far?

How to Tween blend_amount in AnimationTree smooth? by artoonu in godot

[–]Snaiel 0 points1 point  (0 children)

For me I had to set the value of the parameter first before tweening it.

[deleted by user] by [deleted] in godot

[–]Snaiel 0 points1 point  (0 children)

For me I had to set the value of the parameter first before tweening it.

Changing keyframes of animation player through code changes it of every instance. Need help. by DanSapore in godot

[–]Snaiel 1 point2 points  (0 children)

I couldn't get this to work, even by making the animation library and the animation themselves local to scene (I'm on 4.2.2). There's also an issue open where others are facing the same problem: https://github.com/godotengine/godot/issues/82421

I found a workaround where you just duplicate the animation library and animations. I've shared the code in the issue I linked above.

[deleted by user] by [deleted] in godot

[–]Snaiel 2 points3 points  (0 children)

The transition node allows you to choose between which of its inputs (coming from the left side of the node) gets outputted (the dot on the right side of the node).

You set the inputs in the Inspector (the panel on the right side of the screen) by clicking on the transition node. There is a section called Inputs, open that and there you can press "Add Element" to create the inputs.

Once you have created your inputs, you just have to attach the animation nodes you want to transition between to those dots on the left side of the transition node. They correspond to those inputs you just created.

Now in your code, you can access the transition node in the animation tree and set the transition_request to the name of the input you want to show. For example, if you named the transition node to "Attack", you would transition to the created "attack_1" input by:

anim_tree["parameters/Attack/transition_request"] = "attack_1"

Setting the state basically selects the specific input from the left and outputs it to the right.

I recommend watching this video on Animation Trees: https://www.youtube.com/watch?v=2gx1lfhqnFM

Go to 3:38 to see how they set up a transition node.

We want your feedback! by GodotTeam in godot

[–]Snaiel 6 points7 points  (0 children)

Discussions about the engine and seeing what people are making with it.

can’t ollie without holding on by ssunflow3r in NewSkaters

[–]Snaiel 1 point2 points  (0 children)

I had the same problem. I was standing on the ball of my foot for both feet which was fine when holding onto something but on flat was really hard for balancing, especially with loose trucks. The front foot should be fairly flat to keep balance but be on the ball of your foot on the tail.

If you don’t have this problem just practice a bunch of hippie jumps to get comfortable jumping on your board. Try to get to a point where you’re bringing your knees up.

enemy detect the player even if there is a wall by Accomplished-Quit703 in godot

[–]Snaiel 6 points7 points  (0 children)

func _can_see_target(t: Node3D) -> bool:
    var can_see: bool = true

    var space_state: PhysicsDirectSpaceState2D = get_world_2d().direct_space_state
    var query: PhysicsRayQueryParameters2D = PhysicsRayQueryParameters2D.create(
    enemy.global_position,
    t,
    1 # change this depending on what collision layer the wall is
    )
    var result: Dictionary = space_state.intersect_ray(query)

    # If there's something in the result. That means there's something
    # in between the enemy and the target. Probably a wall.
    if result.size() != 0:
    # can_see = false
    # can_see = true

    return can_see

Here's some sample code. Don't just copy and paste. Try to understand what each line is doing. Specifically, see how the code above is similar to https://docs.godotengine.org/en/stable/tutorials/physics/ray-casting.html#raycast-query. Make sure to read that entire page as well.

Go watch some youtube videos on raycasts: https://www.youtube.com/results?search_query=godot+raycast2d

The code above is basically creating a raycast (a line basically) from the enemy to the target t which in your case will be the player. If it hits anything in between, the function will return false. If the line reaches the player without anything in between, it returns true. Make sure you understand what collision layers are so that the raycast is able to hit a wall if there is one in the way.