Skip to content

Commit fee1ba5

Browse files
committed
Removed auto billboard rotation and updated light type change
1 parent 92ee54f commit fee1ba5

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

engine/core/object/Light.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ void Light::setType(LightType type){
2727
if (lightcomp.type != type){
2828
lightcomp.type = type;
2929

30+
lightcomp.needUpdateShadowCamera = true;
31+
lightcomp.needUpdateShadowMap = true;
3032
scene->getSystem<RenderSystem>()->needReloadMeshes();
3133
}
3234
}

engine/core/object/Object.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ void Object::setVisibleOnly(bool visible){
116116
void Object::setBillboard(bool billboard, bool fake, bool cylindrical){
117117
Transform& transform = getComponent<Transform>();
118118

119-
transform.billboardRotation = transform.rotation;
120-
121119
transform.billboard = billboard;
122120
transform.fakeBillboard = fake;
123121
transform.cylindricalBillboard = cylindrical;
@@ -126,8 +124,6 @@ void Object::setBillboard(bool billboard, bool fake, bool cylindrical){
126124
void Object::setBillboard(bool billboard){
127125
Transform& transform = getComponent<Transform>();
128126

129-
transform.billboardRotation = transform.rotation;
130-
131127
transform.billboard = billboard;
132128
}
133129

0 commit comments

Comments
 (0)