when i try to run this script it tells me an error: Assets/MoveAroundObjectScript.js(7,43): BCE0023: No appropriate version of 'UnityEngine.Transform.TransformDirection' for the argument list '(System.Type)' was found.
(comments are locked)
|
|
The problem is with this:
I think you meant to type:
The script reference for TransformDirection explains the correct syntax, and gives examples. However, if I correctly understand what you're trying to do, you can just use transform.forward, which is the blue/z/forward axis of the transform in world space.
(comments are locked)
|
|
Actually, you can use both Vector3.forward and transform.forward, as I've seen both used before. The end result, however, appears to be different from each other so they're not exactly interchangeable. The point was, transform.forward is interchagable with transform.TransformDirection(Vector3.forward)
Dec 08 '10 at 06:31 PM
Mike 3
(comments are locked)
|

When posting code in your question, please highlight it and press the 'format code' icon (with 0s and 1s). Makes it much easier to read! ;)