MCPcopy Index your code
hub / github.com/EngoEngine/engo / Update

Method Update

demos/rotation/rotation.go:95–105  ·  view source on GitHub ↗
(dt float32)

Source from the content-addressed store, hash-verified

93}
94
95func (r *RotationSystem) Update(dt float32) {
96 // speed in radians per second
97 var speed float32 = math.Pi
98 // speed in degrees per second
99 var speedDegrees float32 = speed * 180 / math.Pi
100
101 for _, e := range r.entities {
102 e.SpaceComponent.Rotation += speedDegrees * dt
103 e.SpaceComponent.Rotation = math.Mod(e.SpaceComponent.Rotation, 360)
104 }
105}
106
107func (*DefaultScene) Type() string { return "GameWorld" }
108

Callers

nothing calls this directly

Calls 1

ModFunction · 0.92

Tested by

no test coverage detected