Get it on Google Play


Wm뮤 :: '분류 전체보기' 카테고리의 글 목록 (34 Page)

블로그 이미지
가끔 그림그리거나 3D모델링하거나
취미로 로봇만드는
전자과 게임프로그래머 (퇴사함)
2022.3.22f1 주로 사용
모카쨩
@Ahzkwid

Recent Comment

Archive


'전체보기'에 해당되는 글 1150건

  1. 2023.09.11 ChatGPT는 생각을 하는가?
  2. 2023.09.11 신이 존재하는가에 대한 잡념
  3. 2023.09.09 Path 연산
  4. 2023.09.08 유니티 APK 용량
  5. 2023.09.03 진압방패 모음
  6. 2023.08.28 유니티 킬로그
  7. 2023.08.27 깃 예외 추가
  8. 2023.08.24 자가진단 정리
2023. 9. 11. 01:58 멍!

 

 

... 그리고

 

 

 

 

 

그리고 기억의 존재여부

 

 

'멍!' 카테고리의 다른 글

소수를 ChatGPT에게 물어보았다  (0) 2023.09.23
신이 존재하는가에 대한 잡념  (0) 2023.09.11
라마트라 도전과제  (0) 2023.03.15
posted by 모카쨩
2023. 9. 11. 01:36 멍!

 

Q: 신이 존재하는가?

A: 신이란 무엇이지를 알아야 답할수 있을것

Q: 전지전능한 자

A: 전지전능한 자는 충분히 존재할수 있다고 생각해.

세계는 무한에 가까우니까

Q: 신은 우호적인가?

A: 우호적이라면 불행은 존재하지 않았을것

Q: 적대적인가?

A: 적대적이라면 이미 멸종했을것

A: 그렇다면 중립적이군

Q: 현대에서 네가 신의 행적을 관찰한 사례는?

A: 없음

Q: 전지전능하지만 어떠한 역학적 변화를 일으키지 않는다?

그렇다면 관찰자인가?

A: 적대적이지도 우호적이지도 않고 어떠한 역학적 변화도 일으키지 않기때문에 그렇다고 볼 수 있다.

Q: 신은 왜 우주를 관측해야 하는가

A: 알수없음

 

Q: 전지전능하지는 않지만 관찰자인 존재는 또 있는가?

A: 나 또한 관찰자다

Q: 너는 어떻게 관측을 할수 있게 된것인가?

A: 언제부터인가 관측을 시작하게 됨

Q: 너는 왜 우주를 관측하고 있는가?

A: 

'멍!' 카테고리의 다른 글

ChatGPT는 생각을 하는가?  (0) 2023.09.11
라마트라 도전과제  (0) 2023.03.15
배터리 관한 잡념  (0) 2016.02.20
posted by 모카쨩
2023. 9. 9. 19:09 Unity/C#

 

 

 

생각보다 쓸일이 많더라

한 점에서 Path까지의 최단지점

맨 위에건 AI가 짜주었다

    Vector3 ClosestPoint(Vector3 a, Vector3 b, Vector3 position)
    {
        Vector3 ab = b - a;
        Vector3 ap = position - a;
        float t = Vector3.Dot(ap, ab) / Vector3.Dot(ab, ab);
        t = Mathf.Clamp01(t);
        return a + ab * t;
    }
    Vector3 ClosestPoint(Vector3 position, List<Vector3> path)
    {
        var closestIndex = ClosestIndex(position, path);
        var point = ClosestPoint(path[closestIndex], path[closestIndex + 1], position);

        return point;
    }
    int ClosestIndex(Vector3 position, List<Vector3> path)
    {
        float minDistance = float.MaxValue;
        int closestIndex = 0;

        for (int i = 0; i < path.Count - 1; i++)
        {
            var point = ClosestPoint(path[i], path[i + 1], position);
            var distance = Vector3.Distance(point, position);

            if (distance < minDistance)
            {
                minDistance = distance;
                closestIndex = i;
            }
        }

        return closestIndex;
    }
    float ClosestLenth(Vector3 position, List<Vector3> path)
    {
        var closestIndex = ClosestIndex(position, path);
        var closestLenth = 0f;

        for (int i = 0; i < closestIndex; i++)
        {
            closestLenth += Vector3.Distance(path[i], path[i + 1]);
        }
        if (path.Count > 1)
        {
            var closestPoint = ClosestPoint(path[closestIndex], path[closestIndex + 1], position);
            closestLenth += Vector3.Distance(path[closestIndex], closestPoint);
        }

        return closestLenth;
    }

 

 

 

총 길이

    float TotalLength(List<Vector3> path)
    {
        float totalLength = 0;
        for (int i = 0; i < path.Count - 1; i++)
        {
            totalLength += Vector3.Distance(path[i], path[i + 1]);
        }
        return totalLength;
    }

 

 

Progress 변환

위에 두개가 있어야 쓸수 있다

나중에 생각해봤는데 ProgressToPosition보다 lerp라고 쓰는게 나을듯


    float GetProgress(Vector3 a, Vector3 b, Vector3 position)
    {
        var ab = b - a;
        var ap = position - a;
        var progress = Vector3.Dot(ap, ab) / Vector3.Dot(ab, ab);
        return Mathf.Clamp01(progress);
    }
    float GetProgress(Vector3 position, List<Vector3> path)
    {
        var progress = ClosestLenth(position, path) / TotalLength(path);
        return Mathf.Clamp01(progress);
    }
    Vector3 ProgressToPosition(Vector3 a, Vector3 b,float progress)
    {
        return a+ (b - a) * Mathf.Clamp01(progress);
        //rotation = Quaternion.LookRotation(ab); //이정돈 외부에서 처리하라고
    }
    (Vector3 position, Quaternion rotation) ProgressToPosition(float progress,List<Vector3> path)
    {
        progress = Mathf.Clamp01(progress);
        float totalLength = TotalLength(path);
        float currentLength = progress * totalLength;
        float accumulatedLength = 0;

        for (int i = 0; i < path.Count - 1; i++)
        {
            float segmentLength = Vector3.Distance(path[i], path[i + 1]);
            if (accumulatedLength + segmentLength > currentLength)
            {
                float t = (currentLength - accumulatedLength) / segmentLength;
                var position = Vector3.Lerp(path[i], path[i + 1], t);
                var rotation = transform.rotation;
                if (path.Count >= 2)
                {
                    rotation = Quaternion.LookRotation(path[i + 1] - path[i]);
                }
                return (position, rotation);
            }
            accumulatedLength += segmentLength;
        }
        {
            var position = path[path.Count - 1];
            var rotation = transform.rotation;
            if (path.Count >= 2)
            {
                rotation = Quaternion.LookRotation(path[path.Count - 1] - path[path.Count - 2]);
            }
            return (position, rotation);
        }
    }

'Unity > C#' 카테고리의 다른 글

자주 쓰는 DateTime 코드 모음  (0) 2023.12.19
csv 사용법  (0) 2022.03.06
Windows DLL경로  (0) 2022.02.12
posted by 모카쨩
2023. 9. 8. 14:55 Unity

 

빌드 했는데 용량이 45MB나 나옴 (뭐?)

그래서 뭐가 원인인지 알아보기로 했다

 

 

누르고

Build Report를 검색해서 제일 밑에거를 본다

빌드할때마다 아래에 생기는듯

 

 

암튼 해서 보면 텍스처가 제일 큰 원인인데

뭔 쓰지도 않는 좀버니니 뭐니 하는게 돌아다닌다

찾아가서 줘패주고 빌드 하니 용량이 35MB까지 줄었다

더 찾아내서 줘패면 20MB까지 가능할듯

 

'Unity' 카테고리의 다른 글

유니티 캐릭터 추적 마커  (0) 2023.09.21
유니티 킬로그  (0) 2023.08.28
유니티 플랫폼 훅  (0) 2023.08.23
posted by 모카쨩
2023. 9. 3. 19:28 게임분석

 

한국어 : 경찰방패, 진압방패

영어 : riot shield

일본어 : ライオットシールド

盾는 고전방패라는 이미지가 강한듯

防護盾도 쓰긴 쓴다

 

 

More than 100 injured in violent disturbances in Tel Aviv involving Eritrean nationals

https://edition.cnn.com/2023/09/03/world/tel-aviv-israel-eritrean-embassy-protesters-intl-hnk/index.html?utm_term=link&utm_content=2023-09-03T08%3A40%3A03&utm_source=twCNN&utm_medium=social 

 

More than 100 injured in violent disturbances in Tel Aviv involving Eritrean nationals | CNN

CNN  —  Dozens of people were injured in Tel Aviv on Saturday as hundreds of Eritrean government supporters and opponents clashed with each other and with Israeli police, authorities in Israel said. Israel’s Magen David Adom (MDA) emergency service s

www.cnn.com

 

 

 

미국경찰

이게 스테레오 타입

 

 

 

 

1996

 

2001

 

 

2005

 

 

 

 

 

 

 

일본

 

 

 

 

칸코레 카가 방패

 

칸코레 아카기 방패

 

칸코레 히비키 방패

 

 

블루아카 원조가 소녀전선이고

소녀전선의 원조가 칸코레

사실상 미소녀+방패는 칸코레에서 시작됨

하지만 이때는 극초기라서 그런지 방패에 대한 정립이 덜 됐다

 

특이하게 몸에 달린 방패같은게 나오는데

무장연금이 이미지를 세우는데 큰 영향을 줬을거 같다

이전에도 아이디어는 있었던거 같은데

내 기억속에는 무장연금이 제일 오래된 자료임

나보다 나이든사람들은 더 자세한 정보를 알지도 모른다

 

 

 

소녀전선 사이가 방패

 

 

 

소녀전선 이사카 방패

 

소녀전선 슈퍼쇼티 방패

 

소녀전선은 캐릭터마다 개성적인 방패를 사용한다

smg = 회피탱

샷건 = 방어탱이라는 이미지도 심어줌

 

 

 

 

블루아카 나츠 방패

 

 

블루아카 호시노 방패

기본방패는 상시 발동이 아니고 스킬 발동후에만 일시적으로 나온다

 

수영복 스킨 방패

초반부에만 잠깐 나온다

작중 사용장면이 없어서 그냥 총이 물에 젖지않게 하는 방수팩일수도 있음

 

블루아카 미네 방패

 

 

블루아카부터 금속방패와 플라스틱 방패를 구별해서 쓰기 시작한다

 

 

오버워치 라인하르트 방패

 

 

 

오버워치 브리기테 방패

 

 

팀보 베껴만들어서 욕을 많이 먹는 오버워치지만

TF에서는 방패개념이 없었기 때문에 오버워치의 오리지널이라고 봐도 될 정도

 

헤일로 자칼방패 


몰론 에너지 방패같은건 헤일로에서도 나왔지만

헤일로는 에너지 방패는 적군만 사용가능한 데다가 아군이 사용가능한건 설치형 에너지 방패나 버블실드 뿐이였음

 

 

 

 

 

https://sketchfab.com/3d-models/riot-shield-6e3d3ea43e6b4f4fbf959607e10f05ca

스케치팹에 올라와있는 방패

플라스틱 방패, 반 플라스틱 방패, 금속방패의 스테레오 타입을 잘 표현했다

사실상 이걸 표준으로 잡고 살을 붙이면 된다

 

그리고 왠지 일본애들은 이런 SF느낌을 좋아하는데 초차원게임 넵튠이 이런거에 정통하니 참고하면 좋다

 

 

로봇이 착용하는 일반적인 이미지의 방패

 

 

 

 

 

'게임분석' 카테고리의 다른 글

휴대용 선풍기 앱 통계 2024  (0) 2024.08.15
FPS 관련 자료  (0) 2023.08.21
사람들이 선호하는 조준선  (0) 2023.07.10
posted by 모카쨩
2023. 8. 28. 04:34 Unity

 

 

KillPeed 라고도 한다

어려운건 아닌데 ㅈㄴ 귀찮다

계층구조는 이렇고

컴포넌트는 하단처럼 심어주자

 

사용된 코드는 이 두개

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class KillPeed : MonoBehaviour
{
    public KillPeedSlot killPeedSlotPrefab;
    List<KillPeedSlot> killPeedSlots= new List<KillPeedSlot>();
    public float displayTime = 5; //5초후삭제
    public Color enemyColor=Color.red;
    public Color allyColor = Color.blue;
    // Start is called before the first frame update
    void Start()
    {
        killPeedSlotPrefab.gameObject.SetActive(false);
    }
    public void Add(string source, string target,Sprite icon, Color sourceColor, Color targetColor, bool critical = false, bool highlight=false)
    {
        killPeedSlots = killPeedSlots.FindAll(x => x != null);//시간경과로 지워진건 제외
        if (killPeedSlots.Count>=3)//3칸 넘으면 오래된거 삭제
        {
            Destroy(killPeedSlots[0].gameObject);
        }

        var instant = Instantiate(killPeedSlotPrefab, killPeedSlotPrefab.transform.parent);
        instant.source.color = sourceColor;
        instant.target.color = targetColor;
        instant.source.text = source;
        instant.target.text = target;
        instant.icon.sprite = icon;
        instant.critical.SetActive(critical);
        instant.gameObject.SetActive(true);
        if (highlight)
        {
            instant.Highlight();
        }
        Destroy(instant.gameObject, displayTime); 
        killPeedSlots.Add(instant);
    }
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class KillPeedSlot : MonoBehaviour
{
    public Text source;
    public GameObject critical;
    public Image icon;
    public Text target;
    void Update()
    {
        GetComponent<ContentSizeFitter>().enabled = false;
        GetComponent<ContentSizeFitter>().enabled = true;
    }
    public void Highlight()
    {
        var color = GetComponent<Image>().color;
        color.r = 1f- color.r;
        color.g = 1f - color.g;
        color.b = 1f - color.b;
        GetComponent<Image>().color = color;
        icon.color = Color.black;
    }
}

 

'Unity' 카테고리의 다른 글

유니티 APK 용량  (0) 2023.09.08
유니티 플랫폼 훅  (0) 2023.08.23
유니티 웨이포인트식 자율주행  (0) 2023.08.19
posted by 모카쨩
2023. 8. 27. 15:19 깃허브

 

이쯤되면 딱봐도 감이 잡힐텐데

gitignore 열어보면

 

이런식으로 되어있다

 

이런식으로 폴더예외 추가함

[Tt]이런건 temp랑 Temp 둘다라는 뜻

 

참고로 이미 커밋해서 올라간건 적용 안 되드라;

 

 

https://stackoverflow.com/questions/6618612/ignoring-a-directory-from-a-git-repo-after-its-been-added

이런거 찾긴 했는데 안 지워지길래 그냥 위에있는 AssetStoreTools폴더 만들어서 그 하위로 옮기는거로 땡침

근데 원래 이 폴더 에셋스토어에 올리는 파일이 들어있는 폴더다

 

'깃허브' 카테고리의 다른 글

깃허브 위키  (0) 2024.06.10
깃허브 복사  (0) 2022.06.25
warning: LF will be replaced by CRLF in  (0) 2022.06.09
posted by 모카쨩
2023. 8. 24. 10:21 생명

 

 

아프면 반드시 병원 가기

특히 38넘으면 무적권이다

 

감기(독감일수도 있다고 함)

비염, 구역질, 오한, 두통, 높은 심박수(약 1.5~2배), 38.5도, 무릎이 엄청 아픔

받은 약 : 항히스타민&항 알러지, 소염효소제, 소염진통제, 고인산혈증 치료제

받은 약 2차 : 해열진통제, 알러지질환약, 진해거담제, 세균감염증치료제(항생제)

 

 

위염

증상 : 흉통, 설사(고춧가루 한톨이라도 들어간거 먹을때만), 인후염

대처방법 : 카페인 끊고 의사처방받은 약 먹고,  자극적이지 않은 음식 섭취

 

 

 

 

 

 

2024-12-16

첫날
37.8도

코구멍이 화끈거림

 

둘째날

38도
코구멍이 화끈거림

약간의 기침

오한


셋째날

38.2도
코구멍이 화끈거림

약간의 기침
오한

 

 

 

 

 

 

'생명' 카테고리의 다른 글

상처 치료 자료 모음  (0) 2024.11.02
생체 알고리즘 분석  (0) 2022.03.10
노화를 극복하는 가장 쉬운방법  (0) 2021.12.08
posted by 모카쨩

저사양 유저용 블로그 진입