- Home /
 
 
               Question by 
               Guardian2300 · Dec 18, 2013 at 04:02 PM · 
                texture3dtexture2d  
              
 
              Interactive Textures?
My Idea was to create a Interactive Texture like in Doom 3 where they go over the numbers and they highlight. My Question is that when you use a raycast is there away to get the coordinates of the object getting hit, like the position xyz and rotation xyz.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by thaiscorpion · Dec 18, 2013 at 04:36 PM
You can get all that information the the RaycastHit, if this was your raycast:
     var hit : RaycastHit;
     if (Physics.Raycast (transform.position, -Vector3.up, hit)) {
         //This is the position
                   hit.transform.position
         //And this is the rotation
                 hit.transform.position
     }
 
              Sorry been really busy, I think I realized how they did doom 3 was that each button is its own collider but the buttons look like one object so it was pretty crafty of what they did. Thanks for the help
Your answer