#Card Fanning

1 messages · Page 1 of 1 (latest)

visual cave
#

It will do the first 2 cards fine, but after that, it just spawns the cards in the same places as the first two. I also should mention it doesn’t change the position of the first card when I spawn the second like it should.

craggy wind
#

Should offset be a float?
hand.get_child() can just be cards.global_position
You can breakpoint hand ratio and step through the loop to check the math.

severe harness
#

i actually have a working version as im making my own card game

#

im using container for it

#

is this what you are trying to achieve?

#

my cards are controls, the parent is a custom container class https://docs.godotengine.org/en/stable/classes/class_container.html
basically containers will arrange child controls

#

i think it should be loop_count += 1 on line 19

#

im also not setting the cards position, technically all the cards have the same position, i'm rotating them on a pivot

echo dragon
#

Also for animations, etc, I guess:

https://youtu.be/t8678_R2HzM?si=64SjyO5Vtf3Ywjx5

visual cave
severe harness
#

But you can just have a root node that is control

visual cave
#

I think I tried it earlier and none of my input code would work

#

I’m still a beginner to godot so my apologies if you have to walk me through this

severe harness
#

don’t think so, if for some reason the control is blocking mouse input, there is a setting somewhere in inspector to ignore it i think

visual cave
#

Okay

#

One sec, lemme try it