[Unreal] ์ง€ํ˜• ๋งŒ๋“ค๊ธฐ (Light, Landscape, Water Plugin)
ยท
๐Ÿ“ Game/โœ Unreal
1. ๋ผ์ดํŠธ(Light)์ƒˆ๋กœ์šด level์„ ์ƒ์„ฑํ•˜๋ฉด ์•กํ„ฐ๋ฅผ ๋ฐฐ์น˜ํ•ด๋„ ์•„๋ฌด๊ฒƒ๋„ ๋ณด์ด์ง€ ์•Š๋Š”๋‹ค.  1) Directional LightDirectional Light๋Š” ํƒœ์–‘์˜ ์—ญํ• ์„ ํ•˜๋Š” ๋ผ์ดํŠธ๋กœ ๊ฒŒ์ž„ ์›”๋“œ ๋‚ด ์ „์ฒด์ ์ธ ๋น›์„ ๋‚ธ๋‹ค.๋ชจ๋นŒ๋ฆฌํ‹ฐ: Movable   2) ํ•˜๋Š˜ BP_Sky_Sphere ๋ธ”๋ฃจํ”„๋ฆฐํŠธ๋Š” ์–ธ๋ฆฌ์–ผ์—์„œ ๊ธฐ๋ณธ์œผ๋กœ ์ œ๊ณตํ•˜๋Š” ํ•˜๋Š˜ ๋ธ”๋ฃจํ”„๋ฆฐํŠธ์ด๋‹ค.Directional Light Actor: ์ƒ์„ฑํ•œ Directional Light  ๋” ๋งŽ์€ ํšจ๊ณผ๋ฅผ ์ฃผ๊ณ  ์‹ถ๋‹ค๋ฉด, ์–ธ๋ฆฌ์–ผ ๋งˆ์ผ“ ํ”Œ๋ ˆ์ด์Šค์—์„œ ๋ฌด๋ฃŒ๋กœ ์ œ๊ณตํ•˜๋Š” ๋ธ”๋ฃจํ”„๋ฆฐํŠธ๋„ ์žˆ๋‹ค. ๋ฒˆ๊ฐœ, ๋…ธ์„, ์‚ฌ๋ง‰ ๋“ฑ ์—ฌ๋Ÿฌ ํšจ๊ณผ๋ฅผ ์ œ๊ณตํ•˜๋‹ˆ ํ™œ์šฉํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค.  3) Sky LightDirectional Light์™€ ํ•˜๋Š˜๋งŒ ์„ค์ •ํ•ด๋„ ๊ฝค ๊ดœ์ฐฎ์€ ๋งต์œผ๋กœ ๋ณด์ธ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ ์ด ๋งต..
[Unreal] ํƒ€์ž„๋ผ์ธ(Timeline)
ยท
๐Ÿ“ Game/โœ Unreal
1. ํƒ€์ž„๋ผ์ธํƒ€์ž„๋ผ์ธ ๋…ธ๋“œ๋Š” ๋ธ”๋ฃจํ”„๋ฆฐํŠธ ๋‚ด์—์„œ ๊ฐ„๋‹จํ•œ ์‹œ๊ฐ„ ๊ธฐ๋ฐ˜ ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ๋น ๋ฅด๊ฒŒ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋Š” ํŠน์ˆ˜ ๋…ธ๋“œ์ด๋‹ค. ์ž…๋ ฅ ํ•€play: ํƒ€์ž„๋ผ์ธ ํ˜„์žฌ ์‹œ๊ฐ„์—์„œ ์ •๋ฐฉํ–ฅ ์žฌ์ƒplay from start: ํƒ€์ž„๋ผ์ธ ์ฒ˜์Œ๋ถ€ํ„ฐ ์ •๋ฐฉํ–ฅ ์žฌ์ƒstop: ํƒ€์ž„๋ผ์ธ ํ˜„์žฌ ์‹œ๊ฐ„์—์„œ ์žฌ์ƒ ๋ฉˆ์ถคreverse: ํƒ€์ž„๋ผ์ธ ํ˜„์žฌ ์‹œ๊ฐ„์—์„œ ์—ญ๋ฐฉํ–ฅ ์žฌ์ƒ์ถœ๋ ฅ ํ•€update: ํƒ€์ž„๋ผ์ธ์ด ํ˜ธ์ถœ๋˜์ž๋งˆ์ž ์‹คํ–‰ ์‹ ํ˜ธ ์ถœ๋ ฅ ๊ทธ๋ž˜ํ”„ ํƒญ์ด๋‚˜ ๋‚ด ๋ธ”๋ฃจํ”„๋ฆฐํŠธ ํƒญ์—์„œ ํƒ€์ž„๋ผ์ธ์„ ๋”๋ธ” ํด๋ฆญํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋ธ”๋ฃจํ”„๋ฆฐํŠธ ์—๋””ํ„ฐ์—์„œ ๋ฐ”๋กœ ํŽธ์ง‘์ด ๊ฐ€๋Šฅํ•˜๋‹ค. track ์ถ”๊ฐ€: float, vector ์™ธ ์—ฌ๋Ÿฌ ๊ฐ’์˜ ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ์œ„ํ•œ ํŠธ๋ž™ ์ถ”๊ฐ€Length: ํƒ€์ž„๋ผ์ธ์˜ ์žฌ์ƒ ๊ธธ์ด ์„ค์ • 2. ํ™œ์šฉ๋ฌธ์ด ์—ด๋ฆฌ๊ณ  ๋‹ซํžˆ๋Š” ์• ๋‹ˆ๋ฉ”์ด์…˜์„ ์ถ”๊ฐ€ํ•ด ๋ณผ ๊ฒƒ์ด๋‹ค. ๋จผ์ € ํƒ€์ž„๋ผ์ธ ๋…ธ๋“œ๋ฅผ ์ถ”๊ฐ€ํ•œ ๋’ค,..
[Unreal][C++] AI ์บ๋ฆญํ„ฐ
ยท
๐Ÿ“ Game/โœ Unreal
ํ”Œ๋ ˆ์ด์–ด๋ฅผ ์ถ”์ ํ•˜๋Š” ์  ์บ๋ฆญํ„ฐ๋ฅผ ๋งŒ๋“ค์–ด ๋ณผ ๊ฒƒ์ด๋‹ค. 1. Character ํด๋ž˜์ŠคCharacter ํด๋ž˜์Šค๋ฅผ ์ƒ์†๋ฐ›๋Š” C++ ํด๋ž˜์Šค๋ฅผ ์ƒ์„ฑํ•œ๋‹ค. Character ํด๋ž˜์Šค๋Š” Pawn ํด๋ž˜์Šค์˜ ์ž์‹์œผ๋กœ ์ด์กฑ ๋ณดํ–‰๊ณผ ๊ฐ™์€ ์•„๋ฐ”ํƒ€์— ์‚ฌ์šฉ๋œ๋‹ค. ์ƒ์„ฑํ•œ Character ํด๋ž˜์Šค๋ฅผ ๋ฒ ์ด์Šค๋กœ ๋ธ”๋ฃจํ”„๋ฆฐํŠธ ํด๋ž˜์Šค๋ฅผ ์ƒ์„ฑํ•œ๋‹ค. ๊ทธ ํ›„ ์Šค์ผˆ๋ ˆํƒˆ ๋ฉ”์‹œ, ๋จธํ„ฐ๋ฆฌ์–ผ, ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ ์šฉ ๋ฐฉ๋ฒ•์€ ์ด ๊ธ€์„ ์ฐธ๊ณ ํ•˜๋ฉด ๋œ๋‹ค.   2. AI Controller ํด๋ž˜์Šค์–ธ๋ฆฌ์–ผ ์—”์ง„์—์„œ๋Š” ์บ๋ฆญํ„ฐ๋Š” controller์˜ ์ง€๋ฐฐ๋ฅผ ๋ฐ›๋Š”๋‹ค. ํ”Œ๋ ˆ์ด์–ด ์บ๋ฆญํ„ฐ๋Š” Player Controller์— ๋น™์˜๋˜๊ณ  ๋™์ผํ•˜๊ฒŒ AI ์บ๋ฆญํ„ฐ๋„ AI Controller์— ๋น™์˜๋˜๊ฒŒ ๋œ๋‹ค. ์ง€๊ธˆ์€ AI ์บ๋ฆญํ„ฐ๋ฅผ ๊ตฌํ˜„ ์ค‘์ด๋‹ˆ AI Controller๋ฅผ ์ƒ์†๋ฐ›๋Š” C++ ํด๋ž˜์Šค๋ฅผ ์ƒ์„ฑํ•œ..
[Unreal][C++] ์•„์ดํ…œ ํš๋“, ์ฐฉ์šฉ
ยท
๐Ÿ“ Game/โœ Unreal
์บ๋ฆญํ„ฐ์— ์žฅ์ฐฉ ๊ฐ€๋Šฅํ•œ ์•„์ดํ…œ์„ ํš๋“ํ•œ ํ›„ ์ฐฉ์šฉํ•˜๋Š” ๊ฒƒ์„ ๊ตฌํ˜„ํ•  ๊ฒƒ์ด๋‹ค. 1. ์•„์ดํ…œ ์ƒ์„ฑ์—ฌ๋Ÿฌ ์ข…๋ฅ˜์˜ ์•„์ดํ…œ์„ ๊ด€๋ฆฌํ•  Base C++ Class๋ฅผ ์ƒ์„ฑํ–ˆ๋‹ค. ์ด ํด๋ž˜์Šค์—์„  ํƒ€์ž…, ๋ ˆ๋ฒจ, ๋จธํ„ฐ๋ฆฌ์–ผ, ์ฝœ๋ฆฌ์ „ ๋“ฑ ๊ณตํ†ต์œผ๋กœ ์‚ฌ์šฉ๋  ๊ธฐ๋Šฅ๋“ค์„ ๊ด€๋ฆฌํ•œ๋‹ค. ๊ฐ ์•„์ดํ…œ๋งˆ๋‹ค ๋‹ค๋ฅด๊ฒŒ ๊ตฌํ˜„๋˜์–ด์•ผ ํ•˜๋Š” ๊ฒƒ(์Šคํƒœํ‹ฑ ๋ฉ”์‹œ ๋“ฑ)๋“ค์€ ๋ธ”๋ฃจํ”„๋ฆฐํŠธ ํด๋ž˜์Šค๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ๊ทธ ์•ˆ์—์„œ ๊ด€๋ฆฌ๋˜๋„๋ก ๋ฐฉํ–ฅ์„ ์žก์•˜๋‹ค. ์•„์ดํ…œ๋งˆ๋‹ค ํƒ€์ž…์ด ๋‹ค๋ฅด๊ณ , ๊ฐ™์€ ํƒ€์ž…์˜ ์•„์ดํ…œ์ด๋ผ๋„ ๋ ˆ๋ฒจ์ด ๋‹ค๋ฅด๊ธฐ ๋•Œ๋ฌธ์— ํƒ€์ž…๊ณผ ๋ ˆ๋ฒจ์„ ์„ ์–ธํ–ˆ๋‹ค. UENUM(BlueprintType)enum class EItemType : uint8{ HAT, BAG, KEY, GADGET, MAX};UPROPERTY(EditAnywhere)EItemType Type = EItemType::HAT;UPR..
[Unreal][C++] ํ”Œ๋ ˆ์ด์–ด ์บ๋ฆญํ„ฐ
ยท
๐Ÿ“ Game/โœ Unreal
Character ํด๋ž˜์Šค๋ฅผ ํ™•์žฅํ•ด์„œ ํ”Œ๋ ˆ์ด์–ด์˜ ์ž…๋ ฅ์— ๋ฐ˜์‘ํ•˜๋Š” ์บ๋ฆญํ„ฐ๋ฅผ ๋งŒ๋“ค์–ด ๋ณผ ๊ฒƒ์ด๋‹ค. 1. Character ํด๋ž˜์ŠคCharacter ํด๋ž˜์Šค๋ฅผ ์ƒ์†๋ฐ›๋Š” C++ ํด๋ž˜์Šค๋ฅผ ์ƒ์„ฑํ•œ๋‹ค. Character ํด๋ž˜์Šค๋Š” Pawn ํด๋ž˜์Šค์˜ ์ž์‹์œผ๋กœ ์ด์กฑ ๋ณดํ–‰๊ณผ ๊ฐ™์€ ์•„๋ฐ”ํƒ€์— ์‚ฌ์šฉ๋œ๋‹ค.  ์ด์ œ ์ด ์บ๋ฆญํ„ฐ ํด๋ž˜์Šค์— 3์ธ์นญ ์นด๋ฉ”๋ผ๋ฅผ ๋ถ™์ผ ๊ฒƒ์ด๋‹ค. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))USpringArmComponent* CameraBoom;UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowP..
[C#] abstract, interface, virtual (feat. override, new)
ยท
๐Ÿ“ Language/โœ C#
1. abstract, interface, virtual 1) abstract abstract๋Š” ํŒŒ์ƒ ํด๋ž˜์Šค์—๊ฒŒ ๊ณตํ†ต์ ์ธ ์ •์˜๋ฅผ ์ œ๊ณตํ•จ๊ณผ ๋™์‹œ์— ํŒŒ์ƒ ํด๋ž˜์Šค์— ์‚ฌ์šฉ๋  ๊ธฐ๋Šฅ์„ ๊ฐ•์ œ์ ์œผ๋กœ ์žฌ์ •์˜ํ•จ์— ์žˆ๋‹ค. abstract ํ‚ค์›Œ๋“œ๋กœ ์ •์˜ํ•œ ๋ฉ”์„œ๋“œ๋‚˜ ์†์„ฑ์€ ๋ณธ๋ฌธ์„ ์ •์˜ํ•  ์ˆ˜ ์—†๋‹ค. ์ผ๋ฐ˜ ๋ฉ”์„œ๋“œ๋‚˜ ์†์„ฑ์„ ์ •์˜ํ•  ์ˆ˜ ์žˆ๋‹ค. ์ธ์Šคํ„ด์Šคํ™”ํ•  ์ˆ˜ ์—†๋‹ค. abstract class Animal { public string name; public abstract void Speak(); public void Sleep() { Console.WriteLine("Zzzzz..."); } } class Dog : Animal { public Dog(string name) { this.name = name; } public over..