[Solved] Mmmm, Entity Animation and Body

Marioko

21-10-2006 17:50:07

Hi NxOgrians.. mmmm

I have little question about AnimationState of Entity and Bodies...

What its best way to make a character......???
I need to use Entity together with body??
And how can i use the AnimationState of Entity and body, i mean attach entity to body??

I tried body->addEntity(ent); but i get this error:


error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall nxOgre::body::addEntity(class Ogre::Entity *)" (__imp_?addEntity@body@nxOgre@@QAEXPAVEntity@Ogre@@@Z) referenced in function "public: void __thiscall RateriusScene::createScene(void)" (?createScene@RateriusScene@@QAEXXZ)


Also i tried pass the entity to body constructor but, throw the same error??

What is wrong with me??? :cry:

PD: Sorry but my english... lo siento gente.. :oops: :cry: :cry: :cry:

betajaen

21-10-2006 18:28:31

Hello there,

Character: Character Controller, and bits added to it's node

Animation: Animation is the same as in Ogre, the animation will not apply to the NxOgre world though, you'll have to use a complicated system of ragdolls to pull it off.

Entity: I believe the addEntity requires a string name of the mesh rather an entity itself, it's rather misnamed there.

Marioko

21-10-2006 21:35:08

i trying with factory methos of nxOgre::scene:


1) body* createBody(Ogre::String _name, Ogre::String _meshName, shape *_shape, float _density, pose _pos = pose());

2) body* createBody(Ogre::String _name, Ogre::SceneNode *_node, shape *_shape, float _density, pose _pos = pose());


The 1) works without problems, but in 2) when i pass the sceneNode, the compiler throw this error:


error LNK2019: unresolved external symbol "__declspec(dllimport) public: class nxOgre::body * __thiscall nxOgre::scene::createBody(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Ogre::SceneNode *,class nxOgre::shape *,float,class nxOgre::pose)" (__imp_?createBody@scene@nxOgre@@QAEPAVbody@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVSceneNode@Ogre@@PAVshape@2@MVpose@2@@Z) referenced in function "public: void __thiscall RateriusScene::createScene(void)" (?createScene@RateriusScene@@QAEXXZ)



and in addEntity(..) it receive Ogre::Entity object... or String mesh_name, but in the first case a get the same error...

:roll: ???

betajaen

21-10-2006 23:30:00

1.

Well thats embrassing, I didn't write the code for it. I thought I did, there isn't even a constructor in body to handle it.

Whoops.

2.


myCuboid->addEntity("cube.1m-2m-1m.mesh", pose(Vector3(4,0.5,0),Quaternion(0.92388, -0.382683, -0, -0)));


Works fine with me, what is your code?

Marioko

22-10-2006 14:22:44

this is my code


nxOgre::body* bdy = scn1->createBody
("myCube","box.mesh",new nxOgre::cubeShape(1.0f),10.0f,Vector3(0,50,400));


Its work fine... but i was thinking about it and i can always use bodies instead of entities... but how to change, for example, the material in a body???

My real doubt is about making a character and using his animation states (walk, run, bla, bla) can you give a basic example???

betajaen

22-10-2006 14:35:22

You should just regard a body as an intelligent moving SceneNode, which you can access it through bodyName->mNode, and the first entity is always bodyName->mEntity to change your material.

I haven't dabbled with animation much in Ogre, so I'm not really qualified to give you an answer on that one.

Marioko

22-10-2006 16:31:09

You should just regard a body as an intelligent moving SceneNode, which you can access it through bodyName->mNode, and the first entity is always bodyName->mEntity to change your material.

:D :D hey but that was the answer that i need...

because through the entity i can get the AnimatationState, and all the stuff of the entities....... lol

Thanks a lot...

Ok and about characters, have you an example??? :roll:

betajaen

22-10-2006 16:44:11

Well you can access the entity "box.mesh" through bdy->mEntity, from there you have full access it to all.

606 is all about characters.

Marioko

22-10-2006 20:04:25

ahh ok..

Reading of 606 in progress.....


:P