using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RotationTransform : MonoBehaviour
{
public Vector3 scaleChange; // 크기
public Vector3 positionChange; // 위치
public Vector3 rotationChange; // 회전
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.localScale += scaleChange;
transform.position += positionChange;
transform.Rotate(rotationChange);
}
}
굴러오는 공 - scaleChange
회전하는 판 - rotationChange
커지는 판 - scaleChange, positionChange 적용
첫 작품 야호
'Unity > 연습' 카테고리의 다른 글
[Unity] 자동차로 이것저것 (0) | 2023.01.06 |
---|---|
[Unity] 유사 플래피 비행기 (0) | 2023.01.05 |
[Unity] 키 입력에 따른 자동차 이동과 장애물 충돌 (0) | 2023.01.05 |
[Unity] 스프라이트 파친코 (0) | 2022.12.30 |
[Unity] 소리를 내며 날아가는 냄비와 날아오는 냄비2 (0) | 2022.12.29 |