FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How could I move my camera which passes the fixed defined position?

+2
meteors
iblessyou
6 posters

Go down

How could I move my camera which passes the fixed defined position? Empty How could I move my camera which passes the fixed defined position?

Post  iblessyou Wed Nov 26, 2008 11:25 pm

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...

iblessyou

Posts : 2
Join date : 2008-11-26

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  meteors Thu Nov 27, 2008 7:11 am

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
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  meteors Thu Nov 27, 2008 7:12 am

By the way, if you want to animate the camera, you can either create a timer, or increment the position every frame.


Best,
-joshua
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Thank you for kind reply... but it doesn't works... T.T

Post  iblessyou Thu Nov 27, 2008 11:33 pm

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...

iblessyou

Posts : 2
Join date : 2008-11-26

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  meteors Fri Nov 28, 2008 5:43 am

Don't forget to use this after changing the position:

sio2ObjectBindMatrix( _SIO2object );


-j
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  sio2interactive Fri Nov 28, 2008 5:46 pm

Check the sio2_camera.cc, for like sio2CameraMove, so you can get more information about how the camera mechanism is working...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  skaterazn Thu Jul 23, 2009 8:54 am

hello, i have the same problem, can someone post a solution for this problem?

or how do i use the _SIO2camera->pos ?

skaterazn

Posts : 12
Join date : 2009-07-03

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  zzajin Thu Jul 23, 2009 9:18 am

_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 Very Happy

Manipulating the x,y,z looks like "_SIO2camera->_SIO2transform->loc->x" now.

zzajin

Posts : 81
Join date : 2008-10-14

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  skaterazn Thu Jul 23, 2009 9:51 am

whot do i have to do after using _SIO2camera->_SIO2transform->loc->x?
do i have to bind the matrix or something else?

skaterazn

Posts : 12
Join date : 2009-07-03

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  zzajin Thu Jul 23, 2009 9:58 am

no - sio2CameraRender uses the _SIO2transform.

zzajin

Posts : 81
Join date : 2008-10-14

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  skaterazn Thu Jul 23, 2009 10:02 am

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.

skaterazn

Posts : 12
Join date : 2009-07-03

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  skaterazn Sat Jul 25, 2009 3:59 am

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. Crying or Very sad

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

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  Don Jaffa Sat Jul 25, 2009 4:57 am

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 Razz

Don Jaffa

Posts : 49
Join date : 2009-02-19

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  skaterazn Sat Jul 25, 2009 5:23 am

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 Razz

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

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  Don Jaffa Sat Jul 25, 2009 4:22 pm

Change the movement speed to 0 and set

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

Back to top Go down

How could I move my camera which passes the fixed defined position? Empty Re: How could I move my camera which passes the fixed defined position?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum