Jump to content

  • Log In with Google      Sign In   
  • Create Account


PointInSpace

Member Since 22 Jul 2013
Offline Last Active Jul 23 2013 08:51 PM

Topics I've Started

UnityScript how to I get vector of pointing at object or camera aim

23 July 2013 - 08:55 PM

I am using

 

      transform.lookAt(otherObject);

 

This should point camera of First person Object to look at the other object.  How do I get the vector representing this so that I can send a raycast in same direction?   Also in general how to I get the camera of the FPO ?  How do I get the vector pointing at another object?

 

Thanks,

 

 

 


No appropriate version of 'UnityEngine.Transform.RotateAround'

22 July 2013 - 05:18 PM

I'm getting this error:

 

 Assets/CircularOrbit.js(11,26): BCE0023: No appropriate version of 'UnityEngine.Transform.RotateAround' for the      argument list '(UnityEngine.Vector3, System.Type, float)' was found.

 

Here is my script:

 

#pragma strict
 
function Start () {
 
}
 
function Update () {
   var mountain : GameObject;
// This will return the game object named Hand in the scene.
   mountain = GameObject.Find("QuantumCold_B");
   transform.RotateAround(mountain.transform.position, Vector2,20 * Time.deltaTime);
   
}
 
What I am trying to do is circle around a mountain object which is a mesh.  

PARTNERS