transform.position.y updates very slowly
So i am making my own "2048" game where, as always, boxes with numbers fall down and you have to select a lane to put them. That all theoretically works, however, trying to reposition the boxes is very buggy. My Code for the Onclick event is as following:
public void Lane1() { if (allowclick==true) { newBlock.transform.localPosition = new Vector3(-410,newBlock.transform.position.y,0); allowclick = false; } }
So basically, newBlock is the current Block that you are supposed to control. But whenever i click, it seems like the y position is pretty random. Most of the times, the block jumps up a bit, and I noticed that the offset is getting bigger and bigger the longer the block is on its way. So if I select a Lane shortly before the block would hit the floor, it jumps up a lot. I dont really know why, is this a bug? Or can I change my code in any way so that this will stop happening?
Your answer
Follow this Question
Related Questions
Bugged Player Tp from position one to another 0 Answers
transform.position is not updating the object's position 1 Answer
How could I make an object move from left to right and it will come back from right? 0 Answers
transform.position not applying to my camera. 1 Answer
Moving an object smoothly over predetermined distance without defining begin and end points 0 Answers