Example #1
0
func (s *GameState) CreatePlayer() {
	wo := wobject.NewWObject("player", 2, 1)
	//	wo.Modules[0] = wobject.NewSimpleMoveWModule()
	wo.Modules[0] = NewCharacterControlerWModule()
	wo.Modules[1] = wobject.NewSimpleCollisionWModule()

	s.Player = wo
	s.ObjectManager.RegisterObject(s.Player, v.Vector3f{0, 10, 0}, nil)
}
Example #2
0
File: physics.go Project: pzsz/mold
func CreateBall(pos v.Vector3f) *wobject.WObject {
	wo := wobject.NewWObject("ball", 1, 1)
	wo.Modules[0] = NewPhysicsSphereWModule()

	return wo
}