how to change the position of an object

View previous topic View next topic Go down

how to change the position of an object

Post  narender.mudgal on Tue Aug 11, 2009 3:56 pm

Hi ,
I just started working in sio2 and struggling a lot. i am using 1.4.
i made a spherical object in lender, i used that sio2 in tutorial3 .my requirement needs to dynamically show that object at some specific point. i tried with everything and got no success like, _myObject->dim->x = 200; or myObject->_sio2Transformation->loc->x = 200; or
myObject->_sio2Transformation->pos->x = 200; or what ever but i dont know why that object is not changin a single step of it. how do we dynamically change the object. in blender i made it actor-> rigid body.I saw your tutorials but there is nothing more than blender tutorial and i am not able to understand whats going on in the code. is there any documentation for reading ?

Thanks
Narender.

narender.mudgal

Posts : 7
Join date : 2009-08-08

View user profile

Back to top Go down

Re: how to change the position of an object

Post  sio2interactive on Tue Aug 11, 2009 4:12 pm

After changing the _SIO2transform->pos, call sio2TransformBindMatrix to recalculate the matrix.

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Hi

Post  narender.mudgal on Tue Aug 11, 2009 7:56 pm

Thanks,
i tried by doing this
myObject->_SIO2transform->pos->x += 0.5;
sio2TransformBindMatrix( myObject->_SIO2transform );
and getting this error
_sio2Transform struct have no memeber pos.

Thanks
Naren

narender.mudgal

Posts : 7
Join date : 2009-08-08

View user profile

Back to top Go down

Re: how to change the position of an object

Post  sio2interactive on Tue Aug 11, 2009 8:20 pm

_SIO2transform->loc sorry...

(you could have figure it out yourself when putting the -> Wink )

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

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

View user profile http://sio2interactive.com

Back to top Go down

Hi

Post  narender.mudgal on Tue Aug 11, 2009 8:29 pm

Thanks... but i tried using that and i dont understand what happens... Shocked
can you tell me like how do i give the values to the x,y,z cordinates?

in what way they accept values?

Thanks a lot.

narender.mudgal

Posts : 7
Join date : 2009-08-08

View user profile

Back to top Go down

Re: how to change the position of an object

Post  Francescu on Tue Aug 11, 2009 9:56 pm

You should check tutorial09 - there is code (logic) to move a 3rd person player and the camera. Tutorial09 also has a video tutorial.

Francescu

Posts : 136
Join date : 2009-03-18

View user profile

Back to top Go down

Re: how to change the position of an object

Post  goldfrapp0x0309 on Tue Aug 11, 2009 11:27 pm

How about tutorial 02, which demonstrates the basics, then go from there ;^)
avatar
goldfrapp0x0309

Posts : 43
Join date : 2009-02-28

View user profile

Back to top Go down

Re: how to change the position of an object

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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