Question by
Dave123456789 · Jan 28, 2017 at 04:28 AM ·
objectspositioning
Question about positioning multiple objects
Hey everyone, just starting with unity again and I have an object i made on blender. When I try to position several of these with a for loop using their transform.position I get ridiculous placements. Example:
for (int i = 0; i < numOfObjects; i++){
prefab = instantiate the prefab.
prefab.transform.position = new Vector3(i * prefab.transform.scale.x, 0, 0);
}
This causes the prefabs to get spread out really far instead of side by side like. Is there another solution I can use to solve the problem?
Comment
Your answer
Follow this Question
Related Questions
How can I move two object next to each other while keeping their positions pixel perfect? 0 Answers
What is the best way to rotate an object with marker points ? 0 Answers
How to hold and move a object using other object? 3 Answers
basic Questions about MeshFilter:Optimize mesh 1 Answer
How to add a script to a parent object and not every individual child object. 1 Answer