|
Hi, How to achieve movement of the sprite with complex lines? For example:
but this not work at all... I wonder does anyone have similar problem? Thanks EDIT: I forgot to set initial position of enemy sprite to .zero, so the movment and path is ok, but they far from visible scene... So, sprite set to .zero, then .follow. |
|
You will have more chance of getting help if you can clarify what you mean by it not working. Are you saying nothing moves, or it moves but doesn't move as you expect? Or something else? |
|
Oh, yes, somtimes I forgot the main part... :( (assmed that is obvius) All enemy sprites not moves at all. |
|
Some things to check:
|
|
It was number 3. Enemies path was way off screen, and in the update is removed everything that is out of safe rect... Beginners mistake. |
|
This actually helped me as well. Using the move for a differerent reason, but helped clarify a good bit. Thanks for posting and thanks for putting up the answer. |
SPONSORED Transform your career with the iOS Lead Essentials. Unlock over 40 hours of expert training, mentorship, and community support to secure your place among the best devs. Click for early access to this limited offer and a FREE crash course.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.