You are viewing a single comment's thread from:

RE: Tutorial (Godot Engine v3 - GDScript) - Create lots of Sprites!

in #utopian-io6 years ago

Great tutorial! I noticed something odd though, if I duplicate the sprite and change its offset instead of dragging it to its new location, I don't get that initial centipede-like movement. The sprites jump down all at once without the extra group code. It's very strange.

Sort:  

Hi, just about to jump on a plane, so it's going to be a week. I'm not quite sure what your problem is exactly. When you duplicate a sprite, it rememers ALL the details of the last; including position. However, you also have to remember that a top level sprite at (100, 100) will be that on screen (or global 100x100 as it were). If you have a child sprite at (100, 100), it will actually be globally (200, 200) because it is transformed from the first; unless you set its global_position.

The centipede movement requires even more trickery (if you look at the Verlet examples as a starter). I've been working on, but failed to have ready, the 'waves' of invader attack. Once ready, this should help to explain how it all works. But you'll have to wait a few weeks.

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.027
BTC 64187.97
ETH 3476.17
USDT 1.00
SBD 2.49