Would you like to react to this message? Create an account in a few clicks or log in to continue.

Tutorial14 / adding md2 to tutorial09

2 posters

Go down

Tutorial14 / adding md2 to tutorial09 Empty Tutorial14 / adding md2 to tutorial09

Post  yarri Wed Apr 15, 2009 1:31 am

I've got to stop these late night sessions, and I need to upgrade my membership but I'm stuck on md2 usage and could use some advice. I'm basically trying to add movement control to tutorial14, but think tutorial09 is a better starting point for my game. My question is simply: how can I add the yoshi md2 to tutorial09?

In Blender, I've added the yoshi texture to the "player" object and exported; the new tutorial09.sio2 file looks fine (material/yoshi and image/yoshi.png included) and there are no errors on loading.

In XCode, included yoshi.md2, added md2_loader.c/.h, copied the md2 initialization call from Tutorial14 into Tutorial09 templateRender() function initialization:

// Load our MD2
   SIO2stream *_SIO2stream = sio2StreamOpen( "yoshi.md2", 1 );
   _SIO2stream = sio2StreamClose( _SIO2stream );
The md2 file loads fine, I can see the keyframes loading, etc.

Of course I modified the code above to create a parent/child relationship to "player" which is the cylinder object in Tutorial09:

   _SIO2md2->_SIO2transform->_SIO2parent = sio2ResourceGetObject( sio2->_SIO2resource,
              "object/player" )->_SIO2transform;

Then also in Tutorial09 added the following to the sio2CameraRender() function:

   sio2Md2Render( _SIO2md2,  sio2->_SIO2window, 1 );      

But old Yoshi just ain't showing up for me, and I can't get rid of the tutorial09 player cylinder!

Any advice on what I'm not doing in either Blender or the source code?


PS: Never thought I'd get as far as I have with both SIO2 and Blender -- awesome work, Romain...


Posts : 81
Join date : 2009-04-10

Back to top Go down

Tutorial14 / adding md2 to tutorial09 Empty Re: Tutorial14 / adding md2 to tutorial09

Post  oioioi Wed Apr 15, 2009 5:09 am

You must set the actor on the cylinder to ghost


Posts : 136
Join date : 2008-12-02
Location : Norway

Back to top Go down

Back to top

- Similar topics

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