Hi …
First look this unity scene: (Control ball with WSAD keys)
https://dl.dropboxusercontent.com/u/42356492/Unity/rollBall/WebPlayer/WebPlayer.html
My target is making cube rotate only around Y-Axis to face the same direction of rolling ball ?
Hi …
First look this unity scene: (Control ball with WSAD keys)
https://dl.dropboxusercontent.com/u/42356492/Unity/rollBall/WebPlayer/WebPlayer.html
My target is making cube rotate only around Y-Axis to face the same direction of rolling ball ?
I make this script to cube, but cube not face ball direction correctly !!
Script:
var targ1 : Transform;
var targ2 : Transform;
function Update () {
var orientation = targ1.transform.rotation.y;
targ2.transform.rotation.y = orientation;
}
Unity Scene:
https://dl.dropboxusercontent.com/u/42356492/Unity/rollBall/WebPlayer/WebPlayer.html
The cube must rotate to face rolling ball direction …
From your description, it seems that you need to use Transform.LookAt
Let me know how it goes. I can’t see your Unity project. The webplayer did not load in my browser.
-ikel