using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ThrowOutside : MonoBehaviour
{
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.position += positionChange;
transform.Rotate(rotationChange);
}
}
위 스크립트 추가 후 빈 게임 오브젝트를 냄비의 자식으로 설정
빈 오브젝트에 Audio Source를 추가해 BGM을 추가하고 3D sound settings에서
Min, Max distance를 설정하여 공간음향 설정함
'Unity > 연습' 카테고리의 다른 글
[Unity] 자동차로 이것저것 (0) | 2023.01.06 |
---|---|
[Unity] 유사 플래피 비행기 (0) | 2023.01.05 |
[Unity] 키 입력에 따른 자동차 이동과 장애물 충돌 (0) | 2023.01.05 |
[Unity] 스프라이트 파친코 (0) | 2022.12.30 |
[Unity] 기초 Script 가지고 놀기 (0) | 2022.12.29 |