nautics889 Posted March 17, 2021 Share Posted March 17, 2021 Obviously i didn't read docs attentively, but what is the practice difference between setting x/y directly spriteObj.x = 3; and using setter spriteObj.position.set(3, spriteObj.y); ? I looked to me like nothing was affected, but i'm afraid that further there appears smthn suddenly. Also in case if the second one is really more correct way, how can i set only x coord in beautiful way? For instance, moving obj: spriteObj.x += 10; // looking nice but omits setter spriteObj.position.set(spriteObj.x + 10, spriteObj.y); // too long as for me and requires both coords, here are 3 calls of `spriteObj` Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 17, 2021 Share Posted March 17, 2021 Its actually the same. Use whatever you want. nautics889 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.