little changes to movement of fish
This commit is contained in:
parent
df0e474e8a
commit
acb0e7bb2a
@ -522,9 +522,10 @@ void renderScene(GLFWwindow* window)
|
|||||||
if (animal_in_aquarium) {
|
if (animal_in_aquarium) {
|
||||||
drawObjectPBRWithTexture(models::fish2Context,
|
drawObjectPBRWithTexture(models::fish2Context,
|
||||||
glm::translate(glm::vec3(3.f, 1.25f, 0.0f))
|
glm::translate(glm::vec3(3.f, 1.25f, 0.0f))
|
||||||
|
* glm::rotate(glm::radians(sin(time) * 10.0f), glm::vec3(1.0f, 0.0f, 0.0f))
|
||||||
* glm::eulerAngleY(time) * glm::translate(glm::vec3(1.5f, 0, 0))
|
* glm::eulerAngleY(time) * glm::translate(glm::vec3(1.5f, 0, 0))
|
||||||
* glm::eulerAngleY(time) *glm::translate(glm::vec3(1.5f, sin(time/3), 0)) * glm::translate(glm::vec3(0, 0, 0)) * glm::scale(glm::vec3(0.5f))
|
* glm::eulerAngleY(time) *glm::translate(glm::vec3(1.f, sin(time/3), 0)) * glm::translate(glm::vec3(0, 0, 0))
|
||||||
* glm::rotate(glm::mat4(1.0f), glm::radians(180.0f), glm::vec3(0, 1, 0)),
|
* glm::scale(glm::vec3(0.5f)) * glm::rotate(glm::mat4(1.0f), glm::radians(180.0f), glm::vec3(0, 1, 0)),
|
||||||
|
|
||||||
texture::fishRedTexture,
|
texture::fishRedTexture,
|
||||||
0.5f, 0.0f, 0
|
0.5f, 0.0f, 0
|
||||||
@ -533,7 +534,9 @@ void renderScene(GLFWwindow* window)
|
|||||||
|
|
||||||
if (animal_in_box) {
|
if (animal_in_box) {
|
||||||
drawObjectPBRWithTexture(models::fish2Context,
|
drawObjectPBRWithTexture(models::fish2Context,
|
||||||
glm::translate(glm::vec3(-6.55f, 1.25f, 1.11f)) * glm::scale(glm::vec3(0.5f)),
|
glm::translate(glm::vec3(-6.55f, 1.22f, 1.11f))
|
||||||
|
* glm::rotate(glm::radians(sin(time) * 15.0f), glm::vec3(0.0f, 1.0f, 0.0f)) * glm::rotate(glm::radians(sin(-time) * 5.0f), glm::vec3(1.0f, 0.0f, 0.0f))
|
||||||
|
* glm::translate(glm::vec3(0.0f, 0.05f * sin(1.0f * time), 0.0f)) * glm::scale(glm::vec3(0.5f)),
|
||||||
texture::fishRedTexture,
|
texture::fishRedTexture,
|
||||||
0.5f, 0.0f, 0
|
0.5f, 0.0f, 0
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user