camera rotation problem (model post fixed)
camera rotation problem (model post fixed)
I tried to rotate a model, with the rotate.Y everythings fine, but when i use the X rotation after -68 the model mirrors himself instead of rotating farther
Last edited by Strong99 on Sat Mar 17, 2007 4:51 pm, edited 3 times in total.
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Code: Select all
irr::core::vector3df rot = node->getRotation();
rot.X -= 1;
node->setRotation(rot);
smgr->beginScene(true,true,video::SColor(255,255,255,255));
Device->getSceneManager()->drawAll();
smgr->endScene()
i use an X model
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
no, the model looks like it rotate 90 on the Y but its actualy mirrord
no, nothing calls him, i'm using irr 1.2
no, nothing calls him, i'm using irr 1.2
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
even if i parent him on a FPS camera it hapens, when i go under X < -70, the model mirrors but the came still rotate ok.
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
I found the real problem. The camera was attachd to it annd when the camera came under -70 it hit the max angle and the camera inverted instead of model. But how to fix?
because the the camera has a target and don't follow its models rotation
because the the camera has a target and don't follow its models rotation
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
I need the camera to rotate with the object instead using setTarget, Settarget woun't follow and because of that he takes the shorest route,
i want this:
the red line indicates the upper border of the scene, the upper image strip shows that the camera moves along and the upper corner gets the lower than the bottom of the screen so the camera rotate with me.
But the second example happens. (bottom image strip);
the upper border of the scene stays the upper, it won't rotate with me
i want this:
the red line indicates the upper border of the scene, the upper image strip shows that the camera moves along and the upper corner gets the lower than the bottom of the screen so the camera rotate with me.
But the second example happens. (bottom image strip);
the upper border of the scene stays the upper, it won't rotate with me
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
i noticed that it occurse at rotation X > 55 and rot X < 125,
so i did
it changes on the good values but nothing change ( i did a check)
[EDIT]
Ah, it resets himself i need to set it every time and then setTarget
thanks
so i did
Code: Select all
if (rot.X > 55 && rot < 125)
camera->setUpvector(0.0f,-1.0f,0.0f);
[EDIT]
Ah, it resets himself i need to set it every time and then setTarget
thanks
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99