update another ModelAnimation example
This commit is contained in:
parent
46524a8c46
commit
041142d30c
1 changed files with 2 additions and 5 deletions
|
@ -21,8 +21,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
rl "github.com/gen2brain/raylib-go/raylib"
|
||||
)
|
||||
|
||||
|
@ -76,9 +74,8 @@ func main() {
|
|||
rl.DrawModelEx(model, position, rl.NewVector3(1, 0, 0), -90, rl.NewVector3(1, 1, 1), rl.White)
|
||||
// Draw translation cubes
|
||||
for i := int32(0); i < model.BoneCount; i++ {
|
||||
framePose := unsafe.Slice(anims[0].FramePoses, anims[0].FrameCount)
|
||||
trans := unsafe.Slice(framePose[animFrameCount], model.BoneCount)
|
||||
rl.DrawCube(trans[i].Translation, 0.2, 0.2, 0.2, rl.Red)
|
||||
pose := anims[0].GetFramePose(animFrameCount, int(i))
|
||||
rl.DrawCube(pose.Translation, 0.2, 0.2, 0.2, rl.Red)
|
||||
}
|
||||
rl.DrawGrid(10, 1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue