MCPcopy Create free account
hub / github.com/EngoEngine/engo / SetCamera

Method SetCamera

common/render_shaders_blendmap.go:490–498  ·  view source on GitHub ↗
(c *CameraSystem)

Source from the content-addressed store, hash-verified

488}
489
490func (s *blendmapShader) SetCamera(c *CameraSystem) {
491 if s.cameraEnabled {
492 s.camera = c
493 s.viewMatrix.Identity().Translate(-s.camera.x, -s.camera.y).Rotate(s.camera.angle)
494 } else {
495 scaleX, scaleY := s.projectionMatrix.ScaleComponent()
496 s.viewMatrix.Translate(-1/scaleX, 1/scaleY)
497 }
498}

Callers

nothing calls this directly

Calls 4

RotateMethod · 0.80
TranslateMethod · 0.80
IdentityMethod · 0.80
ScaleComponentMethod · 0.80

Tested by

no test coverage detected