• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by theunsigned · Jun 09, 2020 at 08:54 PM · rotation3dtilespaneltransform.rotation

Rotation roadblock

Hi,

I'm trying to create a 3d endless driving game based on instantiating tiles/panels as the player drives around. I started with perlin noise but settled on a more basic random generator. I have made it so that the PanelManager detects what type of panel the current one is and instantiates PanelGenerators around it but I can't figure out how to rotate those new panels so that the starting point is at the endpoints of the first panel without completely screwing up the positioning or having to hard-code every variation.

I'm looking for advice on how to have the newly instantiated panels "look at" the current panel and rotate accordingly, this will allow for continuous panel generation in all directions but I just don't understand something about rotation in unity and would appreciate any guidance available.

Here are some pictures of what I have and what I want to have: alt textalt text

Here's the PanelGenerator code, please ignore the perlin noise stuff:

 public class PanelGenerator : MonoBehaviour
 {
 
     //public Material whitemat;
     //public GameObject[] buildings, shapes;
     public GameObject cross, downT, rightT, leftT, grass, roadx, roadz; //cube, sphere, capsule, cylinder,
     public int mapWidth = 20;
     public int mapHeight = 20;
     public float seed = 42, noisediv = 10, buildingfootprint = 20, perlinNoiseDivider =10;
     
     
     public enum intersectionType { straight, cross, downT, rightT, leftT};
     public intersectionType _intersectionType;
 
     public enum areaType { city, town, woods, shops };
     public areaType _areaType;
 
     //mapgrid
     int[,] mapgrid;
 
     void Awake()
     {
         //MakeShapes();
         QuadMaker();
     }
     void Start()
     {
         //QuadMaker();
         //MapGridMaker();
         //PerlinRun(mapWidth, mapHeight, seed, noisediv);
 
     }
 
     // Update is called once per frame
     void Update()
     {
         
     }
     public void QuadMaker()
     {
         //create new gameobject Panel
         GameObject Panel = new GameObject();
         Panel.transform.position = transform.position;
         
 
         mapgrid = new int[mapWidth, mapHeight];
 
         //generate new map data
         for (int h = 0; h < mapHeight; h++)
         {
             for (int w = 0; w < mapWidth; w++)
             {
                 //mapgrid[w, h] = (int)(Mathf.PerlinNoise(w / noisediv + seed, h / noisediv + seed) * perlinNoiseDivider);
                 mapgrid[w, h] = 2;
             }
         }
 
         //build streets - randomly pick intersection 
         mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)] = Random.Range(-3, -8);
         //for testing
         //mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)]= -7;
         //Debug.Log(mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)]);
 
 
         //build connecting streets
         if (mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)] < -6) //straight road
         {
             //continue straight
             for (int rs = 0; rs < mapHeight; rs++)
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2), rs] = -1;
                 //buildings/trees/etc. after grass along road
                 
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) - 2, rs] = 1;
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) + 2, rs] = 1;
                 
                 //grass along border of roads
                 if (mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, rs] != 0)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, rs] = 0;
                 }
                 if (mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, rs] != 0)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, rs] = 0;
                 }
             }
 
 
         }
         else if (mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)] < -5) //cross
         {
             
             //right at intersection
             for (int rr = Mathf.RoundToInt(mapWidth / 2) + 1; rr < mapWidth; rr++)
             {
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2)] = -2;
                 //buildings/trees/etc. after grass along road
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 2] = 1;
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 2] = 1;
                 //grass along border of roads
                 if (mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 1] != 0)
                 {
                     mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 1] = 0;
                 }
                 if (mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 1] != 0)
                 {
                     mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 1] = 0;
                 }
             }
             //left at intersection
             for (int rl = 0; rl < Mathf.RoundToInt(mapWidth / 2); rl++)
             {
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2)] = -2;
                 //buildings/trees/etc. after grass along road
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 2] = 1;
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 2] = 1;
                 //grass along border of roads
                 if (mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 1] != 0)
                 {
                     mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 1] = 0;
                 }
                 if (mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 1] != 0)
                 {
                     mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 1] = 0;
                 }
             }
             //continue straight
             for (int rs = Mathf.RoundToInt(mapHeight / 2) + 1; rs < mapHeight; rs++)
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2), rs] = -1;
                 //buildings/trees/etc. after grass along road
                 if (rs > Mathf.RoundToInt(mapWidth / 2) + 2)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) - 2, rs] = 1;
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) + 2, rs] = 1;
                 }
                 //grass along border of roads
                 if (mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, rs] != 0)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, rs] = 0;
                 }
                 if (mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, rs] != 0)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, rs] = 0;
                 }
             }
         }
         else if (mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)] < -4) //down
         {
             mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)+1] = 0;
             mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2) + 2] = 1;
             //right at intersection
             for (int rr = Mathf.RoundToInt(mapWidth / 2) + 1; rr < mapWidth; rr++)
             {
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2)] = -2;
                 //buildings/trees/etc. after grass along road
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 2] = 1;
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 2] = 1;
                 //grass
                 if (mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 1] != 0)
                 {
                     mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 1] = 0;
                 }
                 if (mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 1] != 0)
                 {
                     mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 1] = 0;
                 }
             }
             //left at intersection
             for (int rl = 0; rl < Mathf.RoundToInt(mapWidth / 2); rl++)
             {
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2)] = -2;
                 //buildings/trees/etc. after grass along road
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 2] = 1;
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 2] = 1;
                 //grass along border of roads
                 if (mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 1] != 0)
                 {
                     mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 1] = 0;
                 }
                 if (mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 1] != 0)
                 {
                     mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 1] = 0;
                 }
             }
         }
         else if (mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)] < -3) //left
         {
             mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, Mathf.RoundToInt(mapHeight / 2)] = 0;
             mapgrid[Mathf.RoundToInt(mapWidth / 2) + 2, Mathf.RoundToInt(mapHeight / 2)] = 1;
             
             //left at intersection
             for (int rl = 0; rl < Mathf.RoundToInt(mapWidth / 2); rl++)
             {
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2)] = -2;
                 //buildings/trees/etc. after grass along road
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 2] = 1;
                 mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 2] = 1;
                 //grass
                 if (mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 1] != 0)
                 {
                     mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) - 1] = 0;
                 }
                 if (mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 1] != 0)
                 {
                     mapgrid[rl, Mathf.RoundToInt(mapHeight / 2) + 1] = 0;
                 }
             }
             //continue straight
             for (int rs = Mathf.RoundToInt(mapWidth / 2) + 1; rs < mapHeight; rs++)
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2), rs] = -1;
                 //buildings/trees/etc. after grass along road
                 if (rs > Mathf.RoundToInt(mapHeight / 2) + 2)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) - 2, rs] = 1;
                 }
                 mapgrid[Mathf.RoundToInt(mapWidth / 2) + 2, rs] = 1;
 
                 //grass along border of roads
                 if (mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, rs] != 0)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, rs] = 0;
                 }
                 if (mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, rs] != 0)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, rs] = 0;
                 }
             }
         }
         else if (mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)] < -2) //right
         {
             mapgrid[Mathf.RoundToInt(mapWidth / 2)-1, Mathf.RoundToInt(mapHeight / 2)] = 0;
             mapgrid[Mathf.RoundToInt(mapWidth / 2)-2, Mathf.RoundToInt(mapHeight / 2)] = 1;
             
             //right at intersection
             for (int rr = Mathf.RoundToInt(mapWidth / 2) + 1; rr < mapWidth; rr++)
             {
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2)] = -2;
                 //buildings/trees/etc. after grass along road
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 2] = 1;
                 mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 2] = 1;
                 //grass along border of roads
                 if (mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 1] != 0)
                 {
                     mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) - 1] = 0;
                 }
                 if (mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 1] != 0)
                 {
                     mapgrid[rr, Mathf.RoundToInt(mapHeight / 2) + 1] = 0;
                 }       
             }
             //continue straight
             for (int rs = Mathf.RoundToInt(mapWidth / 2) + 1; rs < mapHeight; rs++)
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2), rs] = -1;
                 //buildings/trees/etc. after grass along road
 
                 mapgrid[Mathf.RoundToInt(mapWidth / 2) - 2, rs] = 1;
                 if (rs > Mathf.RoundToInt(mapHeight / 2) + 2)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) + 2, rs] = 1;
                 }
                 //grass along border of roads
                 if (mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, rs] != 0)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, rs] = 0;
                 }
                 if (mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, rs] != 0)
                 {
                     mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, rs] = 0;
                 }
             }
         }
         //continue road
         for (int r = 0; r < Mathf.RoundToInt(mapHeight / 2); r++) // road onto new tile
         {
             mapgrid[Mathf.RoundToInt(mapWidth / 2), r] = -1;
             //buildings/trees/etc. after grass along road
             if (r < Mathf.RoundToInt(mapHeight / 2) - 1 )
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2) - 2, r] = 1;
                 mapgrid[Mathf.RoundToInt(mapWidth / 2) + 2, r] = 1;
             }
             if (mapgrid[Mathf.RoundToInt(mapWidth/2), Mathf.RoundToInt(mapHeight/2)] ==-3)
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2) - 2, r] = 1;
             }
             if (mapgrid[Mathf.RoundToInt(mapWidth / 2), Mathf.RoundToInt(mapHeight / 2)] == -4)
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2) + 2, r] = 1;
             }
 
             //grass along border of roads
             if (mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, r] != 0)
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2) - 1, r] = 0;
             }
             if (mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, r] != 0)
             {
                 mapgrid[Mathf.RoundToInt(mapWidth / 2) + 1, r] = 0;
             }
         }
         //generate city
         for (int h = 0; h < mapHeight; h++)
         {
             for (int w = 0; w < mapWidth; w++)
             {
                 int result = mapgrid[w, h];
 
                 //make each position based on the width times the buildingfootprint and height(depth) times building footprint to make squares
                 Vector3 pos = new Vector3(w * buildingfootprint, 0, h * buildingfootprint);
 
                 //adjust position based on "pos" and height(depth) and width of each prefab
                 Vector3 adjustedpos = pos + transform.position;
                 //adjustedpos.x= pos.x +
                 adjustedpos.y = 0f;
 
                 //pick intersection and set type
                     //straight
                     if (result < -6)
                     {
                         _intersectionType = intersectionType.straight;
                         GameObject output = Instantiate(roadz, adjustedpos, roadz.transform.rotation) as GameObject;
                         output.transform.SetParent(Panel.transform);
                     }
                     //cross
                     else if (result < -5)
                     {
                         _intersectionType = intersectionType.cross;
                         GameObject output = Instantiate(cross, adjustedpos, cross.transform.rotation) as GameObject;
                         output.transform.SetParent(Panel.transform);
                     }
                     else if (result < -4)
                     {
                         _intersectionType = intersectionType.downT;
                         GameObject output = Instantiate(downT, adjustedpos, downT.transform.rotation) as GameObject;
                         output.transform.SetParent(Panel.transform);
                     }
                     else if (result < -3)
                     {
                         _intersectionType = intersectionType.leftT;
                         GameObject output = Instantiate(leftT, adjustedpos, leftT.transform.rotation) as GameObject;
                         output.transform.SetParent(Panel.transform);
                     }
                     else if (result < -2)
                     {
                         _intersectionType = intersectionType.rightT;
                         GameObject output = Instantiate(rightT, adjustedpos, rightT.transform.rotation) as GameObject;
                         output.transform.SetParent(Panel.transform);
                     }   
 
                 //roads
                 else if (result < -1)
                 {
                     GameObject output = Instantiate(roadx, adjustedpos, roadx.transform.rotation) as GameObject;
                     output.transform.SetParent(Panel.transform);
                 }
                 
                 else if (result < 0)
                 {
                     GameObject output = Instantiate(roadz, adjustedpos, roadz.transform.rotation) as GameObject;
                     output.transform.SetParent(Panel.transform);
                 }
 
                 //get result of perlin noise (1-10) and instantiate a prefab based on it
                 else if (result < 1)// roadside grass =0
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                     output.transform.SetParent(Panel.transform);
                     //set enum of area type - concrete, sparse trees, etc for city - hedges, trees, etc for town
                 }
                 else if (result < 2)//buildings =1
                 {
                     //GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                     //output.transform.SetParent(Panel.transform);
 
                     //set enum of area type - city, town (check for house and put garage of same array number), woods, farm (put field and barn behind), shops, police, factory, powerplant, military, scifi, park, etc
                     //rotate toward road
                 }
                 else if (result < 3) //foliage = 2
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                     output.transform.SetParent(Panel.transform);
 
                     //set enum of area type - tree groups, rocks, hills, etc
                 }
                 else if (result < 4)
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
 
 
                 }
                 else if (result < 5)
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                 }
                 else if (result < 6)
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                 }
                 else if (result < 7)
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                 }
                 else if (result < 8)
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                 }
                 else if (result < 9)
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                 }
                 else if (result < 10)
                 {
                     GameObject output = Instantiate(grass, adjustedpos, Quaternion.identity) as GameObject;
                 }
             }
         }
     }


And here is the PanelManager (I realize I need to make it dependent on the current panel in the future):

 public class PanelManager : MonoBehaviour
 {
 
     public List<GameObject> Panels;
     public GameObject PanelGenerator, Player;
 
     // Start is called before the first frame update
     void Start()
     {
         MakePanels();
     }
 
     // Update is called once per frame
     void Update()
     {
         
     }
 
     public void MakePanels()
     {
         //change this to current panel once everything gets going and start with one
         GameObject panel1 = Instantiate(PanelGenerator) as GameObject;
         PanelGenerator pg = panel1.gameObject.GetComponent<PanelGenerator>();
         Debug.Log(pg._intersectionType);
         if (pg._intersectionType == global::PanelGenerator.intersectionType.straight)
         {
             //top
             GameObject panel3 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x, 0, pg.transform.position.z + (pg.mapHeight * pg.buildingfootprint)), Quaternion.identity) as GameObject;
         }
         else if (pg._intersectionType == global::PanelGenerator.intersectionType.cross)
         {
             //left
             GameObject panel2 = Instantiate(PanelGenerator, new Vector3 (pg.transform.position.x - (pg.mapWidth*pg.buildingfootprint), 0, pg.transform.position.z), Quaternion.identity) as GameObject;
             
             //top
             GameObject panel3 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x, 0, pg.transform.position.z+(pg.mapHeight * pg.buildingfootprint)), Quaternion.identity) as GameObject;
             //right
             GameObject panel4 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x + (pg.mapWidth * pg.buildingfootprint), 0, pg.transform.position.z), Quaternion.AngleAxis(90, Vector3.up)) as GameObject;
             
         }
         else if (pg._intersectionType == global::PanelGenerator.intersectionType.downT)
         {
             //left
             GameObject panel2 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x - (pg.mapWidth * pg.buildingfootprint), 0, pg.transform.position.z), Quaternion.identity) as GameObject;
             //right
             GameObject panel4 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x + (pg.mapWidth * pg.buildingfootprint), 0, pg.transform.position.z), Quaternion.AngleAxis(90, Vector3.up)) as GameObject;
             
         }
         else if (pg._intersectionType == global::PanelGenerator.intersectionType.leftT)
         {
             //left
             GameObject panel2 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x - (pg.mapWidth * pg.buildingfootprint), 0, pg.transform.position.z), Quaternion.identity) as GameObject;
             //top
             GameObject panel3 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x, 0, pg.transform.position.z + (pg.mapHeight * pg.buildingfootprint)), Quaternion.identity) as GameObject;
         }
         else if (pg._intersectionType == global::PanelGenerator.intersectionType.rightT)
         {
             //top
             GameObject panel3 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x, 0, pg.transform.position.z + (pg.mapHeight * pg.buildingfootprint)), Quaternion.identity) as GameObject;
             //right
             GameObject panel4 = Instantiate(PanelGenerator, new Vector3(pg.transform.position.x + (pg.mapWidth * pg.buildingfootprint), 0, pg.transform.position.z), Quaternion.AngleAxis(90, Vector3.up)) as GameObject;
         }
 
     }
 
 }

screenshot-125.png (186.3 kB)
screenshot-127-li-moment.jpg (201.4 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

203 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I rotate my player with a Joystick? 0 Answers

How to make a player rotate in a direction with a slope of the ground. 0 Answers

How to rotate camera around 3D object without breaking camera rotation 0 Answers

On Finger Touch and Drag Rotate 3D Ball 1 Answer

How to make a bone rotate facing towards a given Transform? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges