Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layer重構 #36

Open
xwc2021 opened this issue Feb 17, 2022 · 3 comments
Open

Layer重構 #36

xwc2021 opened this issue Feb 17, 2022 · 3 comments

Comments

@xwc2021
Copy link
Owner

xwc2021 commented Feb 17, 2022

目前的Layer:
ground、groundNotBlockCamera
wall、wallNotBlockCamera

相對麻煩的是:
同1個物體要分別設ground和wall

但是有用Layer效能會好一些嗎?還是效能影響不大?

@xwc2021
Copy link
Owner Author

xwc2021 commented Feb 18, 2022

改成4個Layer(3+1個default)
border、borderBlockCamera
default、BlockCamera

border = ground + wall

@xwc2021 xwc2021 changed the title 真的需要這麼多Layer嗎? Layer重構 Feb 18, 2022
@xwc2021 xwc2021 closed this as completed Feb 19, 2022
@xwc2021
Copy link
Owner Author

xwc2021 commented Feb 19, 2022

目前和物理相關的Layer

Border:可以跳、會繞過
BorderBlockCamera:可以跳、會繞過、有Camera Collistion
BorderNoAvoid:可以跳、不會繞過
BlockCamera:有Camera Collistion
default:什麼都不做
HitFloor:給 kinematic rigidbody 收集 hitFloorNormal用(因為OnCollisionStay收集不到它的接觸資訊)

@xwc2021 xwc2021 reopened this Feb 20, 2022
@xwc2021
Copy link
Owner Author

xwc2021 commented Feb 21, 2022

BorderNoAvoid可以用在rigidbody上
玩家、NPC、Monster預設在default
LayerSetting

xwc2021 pushed a commit that referenced this issue Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant