r/UnityHelp • u/BuildingShowcase • 16h ago
GameObject.transform.position.x += 0.1f not doing anything
The title, even though position.x is a float, nothing appears to move, and no errors appear
Here is the code
Vector3 pressPos = presser.transform.position;
string DisplayNum = CounterNumber.ToString("D4");
for (int i = 0; i < 9; i += 1)
{
pressPos.x += 0.1f;
}
1
Upvotes
View all comments
1
u/-goldenboi69- 14h ago
Your code is wrong and weird.