Hi, I got two empty game object called A and B respectively, and a cube. How to i make a cube move from A to B upon instantiation and destroy itself after the moving part is done? Is it possible to use Transform.translate in this case? Thanks!
http://www.unifycommunity.com/wiki/index.php?title=MoveObject
var pointA : Transform;
var pointB : Transform;
var moveSpeed = 1.0;
function Start () {
yield MoveObject.use.Translation (transform, pointA.position, pointB.position, moveSpeed, MoveType.Speed);
Destroy (gameObject);
}
There is something wrong with ur script Eric5h5. I don’t know why but I’m getting an error.
It says “unknown identifier: MoveObject” at 6,11.
How can I fix it?