Tuesday, March 26, 2013

Thomas Update

Okay, I now have the blog information, and this is what I have been working on.

I have been working on the Ground Pound power, which is extremely difficult since there are not many references to go off of for Unity, so I had to think about things in a different way. After trying several different things, I decided that I should try Raycast, so it would send Rockman to the next collider it hits, but I still have to input the command, but after I can get that fixed, it should work. This is the script I deriving it from, and following a few script organization tuts so I can get it ordered in the EXACT way it has to be for it to work.


Script I derived my idea and script from:


  •  
  • function Update () {
  • var hit : RaycastHit;
  • if (Physics.Raycast (transform.position, -Vector3.up, hit, 100.0)) {
  • var distanceToGround = hit.distance;
  •  
  • // location of hit -> hit.point
  • var pointOfRayHit = hit.point;
  •  
  • Debug.Log( "Ray : hit.distance = " + hit.distance + " : hit.point = " + hit.point );
  • }
  • }
  • No comments:

    Post a Comment