How could I move my camera which passes the fixed defined position?
+2
meteors
iblessyou
6 posters
How could I move my camera which passes the fixed defined position?
I would like to move the camera automatically but I don't know how to.....
for instance suppose I made a camera path by defining 50 position points, and
I want my camera to pass all these coordinate position points.
here, I would like to know how could i make coordinate position points and
base on coordinate position points how could I move my camera.
I know that SIO2 engine has sio2CameraMove() and sio2CameraRotateZ() functions.
but those two functions do not have coordinate position argument...
>>>>>>> Please help me ~~~
Thank you for reading...
for instance suppose I made a camera path by defining 50 position points, and
I want my camera to pass all these coordinate position points.
here, I would like to know how could i make coordinate position points and
base on coordinate position points how could I move my camera.
I know that SIO2 engine has sio2CameraMove() and sio2CameraRotateZ() functions.
but those two functions do not have coordinate position argument...
>>>>>>> Please help me ~~~
Thank you for reading...
iblessyou- Posts : 2
Join date : 2008-11-26
Re: How could I move my camera which passes the fixed defined position?
Hi,
Yes, you can use _SIO2camera->pos->x, SIO2camera->pos->y, SIO2camera->pos->z
pos is a vec3 vector type.
Check the docs which came with SIO2.
Best,
-joshua
Yes, you can use _SIO2camera->pos->x, SIO2camera->pos->y, SIO2camera->pos->z
pos is a vec3 vector type.
Check the docs which came with SIO2.
Best,
-joshua
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: How could I move my camera which passes the fixed defined position?
By the way, if you want to animate the camera, you can either create a timer, or increment the position every frame.
Best,
-joshua
Best,
-joshua
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Thank you for kind reply... but it doesn't works... T.T
I don't know how to use it....
I assumed my desired coordinate position is x = 0.4f, y = 0.3f, y = 0.1f. and
I did like this
sio2->_SIO2camera->pos->x = 0.4f;
sio2->_SIO2camera->pos->y = 0.3f;
sio2->_SIO2camera->pos->z = 0.1f;
sio2->sio2CameraMove(sio2->_SIO2camera, sio2->_SIO2widow, 1);
sio2CameraRender( sio2->_SIO2camera );
but doesn't works...camera doesn't moves...
I assumed my desired coordinate position is x = 0.4f, y = 0.3f, y = 0.1f. and
I did like this
sio2->_SIO2camera->pos->x = 0.4f;
sio2->_SIO2camera->pos->y = 0.3f;
sio2->_SIO2camera->pos->z = 0.1f;
sio2->sio2CameraMove(sio2->_SIO2camera, sio2->_SIO2widow, 1);
sio2CameraRender( sio2->_SIO2camera );
but doesn't works...camera doesn't moves...
iblessyou- Posts : 2
Join date : 2008-11-26
Re: How could I move my camera which passes the fixed defined position?
Don't forget to use this after changing the position:
sio2ObjectBindMatrix( _SIO2object );
-j
sio2ObjectBindMatrix( _SIO2object );
-j
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: How could I move my camera which passes the fixed defined position?
Check the sio2_camera.cc, for like sio2CameraMove, so you can get more information about how the camera mechanism is working...
Re: How could I move my camera which passes the fixed defined position?
hello, i have the same problem, can someone post a solution for this problem?
or how do i use the _SIO2camera->pos ?
or how do i use the _SIO2camera->pos ?
skaterazn- Posts : 12
Join date : 2009-07-03
Re: How could I move my camera which passes the fixed defined position?
_SIO2transform has been added since this thread was started.
"Check the sio2_camera.cc, for like sio2CameraMove, so you can get more information about how the camera mechanism is working..."
is still good advice
Manipulating the x,y,z looks like "_SIO2camera->_SIO2transform->loc->x" now.
"Check the sio2_camera.cc, for like sio2CameraMove, so you can get more information about how the camera mechanism is working..."
is still good advice
Manipulating the x,y,z looks like "_SIO2camera->_SIO2transform->loc->x" now.
zzajin- Posts : 81
Join date : 2008-10-14
Re: How could I move my camera which passes the fixed defined position?
whot do i have to do after using _SIO2camera->_SIO2transform->loc->x?
do i have to bind the matrix or something else?
do i have to bind the matrix or something else?
skaterazn- Posts : 12
Join date : 2009-07-03
Re: How could I move my camera which passes the fixed defined position?
no - sio2CameraRender uses the _SIO2transform.
zzajin- Posts : 81
Join date : 2008-10-14
Re: How could I move my camera which passes the fixed defined position?
so i have to do something like this:
sio2->_SIO2camera->_SIO2transform->loc->x = 7.0f;
and then
sio2CameraRender(sio2->_SIO2camera); ?
but it doesn't work.
sio2->_SIO2camera->_SIO2transform->loc->x = 7.0f;
and then
sio2CameraRender(sio2->_SIO2camera); ?
but it doesn't work.
skaterazn- Posts : 12
Join date : 2009-07-03
Re: How could I move my camera which passes the fixed defined position?
i really need your help.
i just want the camera move to a specific position, when i tap the screen.
but it doesn't work with
sio2->_SIO2camera->_SIO2transform->loc->y = 7.0f;
please help me.
edit: i've tried it in the tutorial 4 template and it's working there, but in tutorial 6, it's not working, why? because of the physics?
i just want the camera move to a specific position, when i tap the screen.
but it doesn't work with
sio2->_SIO2camera->_SIO2transform->loc->y = 7.0f;
please help me.
edit: i've tried it in the tutorial 4 template and it's working there, but in tutorial 6, it's not working, why? because of the physics?
skaterazn- Posts : 12
Join date : 2009-07-03
Re: How could I move my camera which passes the fixed defined position?
remember you can also use
To move the camera, though if you are trying to move it to a specific point using this method might mean using a lot of maths
- Code:
sio2->_SIO2camera->_btRigidBody->setLinearVelocity( btVector3( (0, 0, 0 ) );
To move the camera, though if you are trying to move it to a specific point using this method might mean using a lot of maths
Don Jaffa- Posts : 49
Join date : 2009-02-19
Re: How could I move my camera which passes the fixed defined position?
Don Jaffa wrote:remember you can also use
- Code:
sio2->_SIO2camera->_btRigidBody->setLinearVelocity( btVector3( (0, 0, 0 ) );
To move the camera, though if you are trying to move it to a specific point using this method might mean using a lot of maths
ok, if i use that method, how to stop the camera from sliding at the specific point?
skaterazn- Posts : 12
Join date : 2009-07-03
Re: How could I move my camera which passes the fixed defined position?
Change the movement speed to 0 and set
or similar (I don't personally have to stop the camera so I'm not sure but I'd imagine it is to do one of these two)
- Code:
sio2->_SIO2camera->_btRigidBody->setFriction( (btScalar)1.0 );
sio2->_SIO2camera->_btRigidBody->setRestitution( (btScalar)1.0 );
or similar (I don't personally have to stop the camera so I'm not sure but I'd imagine it is to do one of these two)
Don Jaffa- Posts : 49
Join date : 2009-02-19
Similar topics
» how can move other object near
» dinamic fixed or kinematic
» Animating and Parenting an SIO2Widget
» Culling failing on duplicated objects
» move widget
» dinamic fixed or kinematic
» Animating and Parenting an SIO2Widget
» Culling failing on duplicated objects
» move widget
Permissions in this forum:
You cannot reply to topics in this forum