entity: physics rewrite
This commit is contained in:
@@ -3,6 +3,7 @@ package game
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
"runtime"
|
||||
|
||||
@@ -52,7 +53,8 @@ func (g *Game) imgui() {
|
||||
if imgui.BeginV("Player", nil, imgui.WindowFlagsAlwaysAutoResize) {
|
||||
pos := g.player.Position()
|
||||
vel := g.player.Speed()
|
||||
imgui.Text(fmt.Sprintf("Pos: (%.5f, %.5f, %.5f), Vel: (%.5f, %.5f, %.5f)", pos[0], pos[1], pos[2], vel[0], vel[1], vel[2]))
|
||||
igwrap.Text("Pos: (%.5f, %.5f, %.5f), Vel: (%.5f, %.5f, %.5f)", pos[0], pos[1], pos[2], vel[0], vel[1], vel[2])
|
||||
igwrap.Text("VelXZ=%.5f, VelXYZ=%.5f", math.Sqrt(vel[0]*vel[0]+vel[2]*vel[2]), vel.Length())
|
||||
}
|
||||
imgui.End()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user