entity: physics rewrite
This commit is contained in:
@@ -166,6 +166,7 @@ func (g *Game) Init(win *glfw.Window) {
|
||||
igwrap.MouseScrollCallback(xpos, ypos)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
const airAccel = 0.1
|
||||
@@ -234,7 +235,7 @@ func (g *Game) Update(win *glfw.Window, delta time.Duration) {
|
||||
io.ViewPos = g.player.EyePosition()
|
||||
io.ViewDir = itype.Vec3d(mgl64.Rotate3DY(float64(g.rotY.Radians())).Mul3(mgl64.Rotate3DZ(float64(itype.Degrees(g.rotZ)))).Mul3x1(mgl64.Vec3{1, 0, 0}))
|
||||
|
||||
render.Framewire.PushBox(g.player.WorldHitbox().ToFloat32(), color.White)
|
||||
render.Framewire.PushBox(g.player.WorldHitbox()[0].ToFloat32(), color.White)
|
||||
|
||||
if g.player.Position()[1] < -100 {
|
||||
g.player.SetPosition(itype.Vec3d{18, 80, 18})
|
||||
|
||||
Reference in New Issue
Block a user