Reputation: 1035
i declared
public Vector3 floorPosition;
in class. In start function i given
floorPosition = new Vector3(0.000f,0.500f,-8.250f);
i tried to instantiate a gameobject in floorPosition. But object comes in (0.0, 0.5, -8.3). Automatically it get rounds. What i have to do to get gameobject in exact position.
Thanks in Advance
Upvotes: 0
Views: 1467
Reputation: 490
The weird thing is that if you type
floorPosition = new Vector3(0.0f,0.5f,-8.250f);
transform.position = floorPosition;
The inspector will show the exact position you asked for (so I think you object is actually in the right spot) but the Debug.Log() will round it.
Upvotes: 1