fix: rotation
This commit is contained in:
		| @@ -144,7 +144,7 @@ void Engine::setup() | ||||
|  | ||||
| 	// Create camera | ||||
| 	camera_ = std::make_shared<Camera>(); | ||||
| 	camera_->set_position(glm::vec3(0.0f, 1.0f, 10.0f)); | ||||
| 	camera_->set_position(glm::vec3(0.0f, 4.0f, 12.0f)); | ||||
| 	camera_->set_rotation(glm::vec3(glm::radians(-20.0f), 0.0f, 0.0f)); | ||||
| 	camera_->set_projection( | ||||
| 	    glm::perspective(glm::radians(45.0f), | ||||
| @@ -160,7 +160,7 @@ void Engine::setup() | ||||
| 	auto box_stack_mesh = Mesh::load("data/models/box_stack.obj"); | ||||
| 	if (box_stack_mesh) { | ||||
| 		auto box_stack_model = std::make_shared<Model>(box_stack_mesh); | ||||
| 		box_stack_model->set_position(glm::vec3(-2.0f, 0.0f, 0.0f)); | ||||
| 		box_stack_model->set_position(glm::vec3(-2.0f, -1.25f, 0.0f)); | ||||
| 		models_.push_back(box_stack_model); | ||||
| 		world_->add_entity(box_stack_model); | ||||
| 		Logger::info("Box stack model loaded and added to world"); | ||||
| @@ -172,7 +172,9 @@ void Engine::setup() | ||||
| 		auto gunslinger_model = | ||||
| 		    std::make_shared<Model>(gunslinger_mesh); | ||||
| 		gunslinger_model->set_position(glm::vec3(2.0f, 0.0f, 0.0f)); | ||||
| 		gunslinger_model->set_scale(glm::vec3(0.5f, 0.5f, 0.5f)); | ||||
| 		gunslinger_model->set_rotation( | ||||
| 		    glm::vec3(0.0f, glm::radians(-30.0f), 0.0f)); | ||||
| 		gunslinger_model->set_scale(glm::vec3(0.1f, 0.1f, 0.1f)); | ||||
| 		models_.push_back(gunslinger_model); | ||||
| 		world_->add_entity(gunslinger_model); | ||||
| 		Logger::info("Gunslinger model loaded and added to world"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user