【ゲームエンジン】Unity初心者質問スレBuild1
at GAMEDEV
482:名前は開発中のものです。
18/08/24 12:24:40.51 4yphetVh.net
すまん横着した
こっちで
void Update()
{
Vector3 prePosition = transform.position;
this.transform.position = Vector2.MoveTowards(this.transform.position, new Vector2(Player.transform.position.x, Player.transform.position.y), Speed * Time.deltaTime);
Vector3 scale = transform.localScale;
if(transform.position.x - prePosition.x >= 0){
scall.x = 1;
}else{
scall.x = -1;
}
transform.localScale = scale;
}
次ページ最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
2448日前に更新/329 KB
担当:undef