| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- attribute
- stride
- Unreal Engine
- gas
- linear regression
- animation
- widget
- 유니티
- gameplay effect
- photon fusion2
- 언리얼 엔진
- 게임개발
- listen server
- unity
- local prediction
- C++
- 언리얼엔진
- MAC
- ability task
- 게임 개발
- gameplay tag
- Aegis
- Replication
- 보안
- rpc
- os
- Multiplay
- UI
- gameplay ability system
- CTF
Archives
- Today
- Total
Replicated
[Fortress Craft] Animation - Damaged (Flash White) 본문
대미지를 받았을 때 하얗게 번쩍이는 효과를 주려고 했는데,
문제는 스프라이트 렌더러의 색상을 바꿔서는 불가능
색상 변화가 더하기 방식이 아니라 곱하기 방식이기 때문에 셰이더를 하나 만들어서 머테리얼을 만들어야 함
Shader "PaintWhite"
{
Properties
{
_MainTex("Particle Texture (Alpha8)", 2D) = "white" { }
}
Category
{
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
Blend SrcAlpha One
Cull Off Lighting Off ZWrite Off Fog { Color(0, 0, 0, 0) }
BindChannels
{
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
SubShader
{
Pass
{
SetTexture[_MainTex]
{
combine primary, texture * primary
}
}
}
}
}
인터넷에서 주워온 PaintWhite 셰이더 코드

해당 셰이더를 사용해서 머테리얼 생성

애니메이션 Damaged를 만들고 머테리얼 레퍼런스를 교체하는 방식 사용

다른 작업을 하는 도중에 FlashWhite가 발생해야 하기에
레이어 분리

Damaged 트리거 발생 시 Flash White
평소에는 기본 애니메이션 (기본 머테리얼 사용)
* 문제가 있었던 부분

하얀색으로 반짝이는 부분이 동기화가 제대로 안되는 문제가 발생
네트워크 메카님 애니메이터 컴포넌트의 State Layers 활성화시키니 해결됨
'유니티 엔진 > Fortress Craft' 카테고리의 다른 글
| [Fortress Craft] Target Setting / Attack Enabled (0) | 2025.02.05 |
|---|---|
| [Fortess Craft] Path Finding (0) | 2025.02.05 |
| [Fortress Craft] Damage System (0) | 2025.02.05 |
| [Fortress Craft] Unit AutoSpawning In Network (0) | 2025.02.05 |
| [Fortress Craft] 개요 (0) | 2024.10.12 |