Skip to content

Commit 2634b05

Browse files
authored
fix: single point of camera update logic to avoid duplication and conflicting transformations (#1195)
1 parent a69674d commit 2634b05

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

gdspx.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func (p *Game) OnEngineUpdate(delta float64) {
8181
}
8282
// all these functions is called in main thread
8383
p.syncUpdateInput()
84-
p.syncUpdateCamera()
8584
p.syncUpdateLogic()
8685
p.syncEnginePositions()
8786
p.syncUpdateProxy()
@@ -135,13 +134,6 @@ func (p *Game) syncEnginePositions() error {
135134
return nil
136135
}
137136

138-
func (p *Game) syncUpdateCamera() {
139-
isOn, pos := p.camera.getFollowPos()
140-
if isOn {
141-
engine.SyncSetCameraPosition(pos)
142-
}
143-
}
144-
145137
func (p *Game) syncUpdateInput() {
146138
p.mousePos = engine.SyncGetMousePos()
147139
}

0 commit comments

Comments
 (0)