hi everyone, wink

I search a way in c++ to change the material of an entity without change those of the others entities using the same mesh (clones) ?
Same thing for the bones animation, how play an animation of an entity and play an other animation of an entity using the same mesh at the same time ?

regards

27

(12 replies, posted in General)

Is the mesh texture coordinates on UV ? wink

Ok, thanks wink

Hi, I have an another question about SDK, I try to attach a Follow behavior to a 3d Entity :

MBehaviorManager * bManager = MEngine::getInstance()->getBehaviorManager();
MBehaviorCreator * bCreator = bManager->getBehaviorByName("Follow");
MBehavior * behavior = bCreator->getNewBehavior(object);
object->addBehavior(behavior);

it work, but how can I change the "delay", "offset" ... attributes of "behavior" ?
I try to convert "behavior" with an expression like "(Follow *) behavior" but it doesn't work ...

Ok, I will try, thanks wink

can I use this everywhere or just in the game class ?

Hi, the question is in the title wink

33

(8 replies, posted in Engine)

Ok, I think I understand, thanks for the answer (and thanks zester for the translation wink)

34

(8 replies, posted in Engine)

anael wrote:

Le cube en ghost ne rentre pas en collision avec le personnage ?

je pense résoudre ce problème, soit en évitant au cube de passer au travers du personnage, soit en utilisant
isObjectsCollision (phyPropsCube->getCollisionObjectId(), phyPropsPerso->getCollisionObjectId())
et décrémenter de 1 si true wink

pour revenir à mon problème de pathfinding, si par exemple un mur se trouve à (4,0,0)  devant le personnage en (0,0,0), le cube étalon aurait un coté de 1.

int TABCollision [10];
cube->setPosition(1,0,0);
TABCollision [0] = physics->isObjectInCollision(phyPropsCube->getCollisionObjectId());
cube->setPosition(2,0,0);
TABCollision [1] = physics->isObjectInCollision(phyPropsCube->getCollisionObjectId());
cube->setPosition(3,0,0);
TABCollision [2] = physics->isObjectInCollision(phyPropsCube->getCollisionObjectId());
cube->setPosition(4,0,0);
TABCollision [3] = physics->isObjectInCollision(phyPropsCube->getCollisionObjectId());

Est-ce que le tableau TABCollision contiendra les valeur 0,0,0,1 (mettons 1,0,0,1 si le personnage est compté dans la première collision) ?

35

(8 replies, posted in Engine)

En fait pour savoir par exemple si un personnage est en face d'un mur, je comptais utiliser un cube en "ghost" et lui faire adopter différentes positions autour du personnage en réalisant à chaque fois un test de collision afin de définir au mieux son environnement.

Le problème c'est que j'ai l'impression que si on fait un test de collision, qu'on déplace le cube et que juste après on refait un autre test de collision, le deuxième test renverrait la même valeur que le premier, ainsi je me demandais si updateSimulation() résoudrait mon problème.

Hi, I work currently on a 3D pathfinding and I have a question about physics simulation :
How make severals collisions tests in a row ("d'affilée") ?

I think there is one collision simulation / frame / 3Dobject,  the methode "updateSimulation()" can make another collision simulation ?

thanks Anael for these precisions wink

Hi, i try to count the number of meshs which are in collision with an ghost entity, but maratis crash ... this is the code I use :

MEngine * engine = MEngine::getInstance();
        MyGame * game = (MyGame*) engine->getGame();
        MLevel* lvl = engine->getLevel();
        MScene* scene = lvl->getCurrentScene();

        unsigned int Id;
                int nbColl;
        MOEntity* ent= scene->getEntityByName("myEntity");
        scene->getObjectIndex(ent->getName(), &Id);
        MPhysicsContext * physCont = engine->getPhysicsContext();

        nbColl = physCont->isObjectInCollision (Id);
// here maratis crash

39

(2 replies, posted in General)

thanks for these details wink

40

(2 replies, posted in General)

Hi, I am working on some functions in c++ using array, and I wish know if "int [NB]" is really more faster than "vector <int>" (a class from vector.h) ? wink

41

(25 replies, posted in Showcase)

very nice work ! smile

42

(6 replies, posted in General)

Is it also a bug with "onKeyDown()" (with the maratis engine) ?

Alinor wrote:

I have some problems with the function "bool onKeydown(* char)" with keyboard symbols : the effect in maratis is quite similar to "bool isKeyPressed(* char)", I think that I should maybe use "void flush(void)" but I don't know how do it ...

Hi, I have an interesting problem : maratis work perfectly on my computer, but on certain computers (windows seven, Xp, ... ), when we start for example "waterGameDemo", meshs don't appear,  instead of we have the blue screen of an empty scene.

It's the same things for "YoFrankie" and "Demo", but not for "sponzaFPS" which work perfectly, I don't really understand why ...

44

(7 replies, posted in Showcase)

very nice smile

45

(49 replies, posted in General)

Hi I have also some generals questions :

About engine c++ :

I have some probleme with the function "bool onKeydown(* char)" with keyboard symbols : the effect in maratis is quite similar to "bool isKeyPressed(* char)", I think that I should maybe use "void flush(void)" but I don't know how do it ...

About graphism :

can we create a function c++ who render a texture progressively transparent and finally set the visibilty of the object on "off" (using the function "setInvisible" (to erase object too far from the camera  for example) wink

46

(61 replies, posted in Editor)

anael wrote:

Reading mp3 is not an option as it is not a royalty free codec.

Hum, I suspected as much. -_-
thanks for your fast answer, I shall try to find a converter mp3 - aiff wink

47

(61 replies, posted in Editor)

Hi, I have a little but very important request : I wish import compressed sound like mp3 ... wink
because for short sound, wav is perfect, but to import musics or atmosphere sounds ...

48

(49 replies, posted in General)

an other way to zoom is to move closer the camera and the object wink

Here a very basic example in c++ (sorry I am not very good in Lua)

float zoomSpeed = 1.0; // the zoom speed
MOEntity* camera, cible; 
MVector3 vector = cible->getPosition() - camera->getPosition();
vector.getNormalize()*= zoomSpeed;
camera->setPosition(camera->getPosition()+vector);

I wish that this could help you wink

49

(0 replies, posted in Bug report)

apparently, this fonction works only with "MOUSE_BUTTON1", "MOUSE_BUTTON2" and "MOUSE_BUTTON3", for all other buttons, onKeyDown has the same effect than isKeyPressed. ( it's visible, for example, in changing the "MOUSE_BUTTON1" of the GUIDemo Project in "A")

50

(8 replies, posted in Scripting)

there is a very good parallax shader article on the Unity3d website wink

http://unity3d.com/support/documentatio … ffuse.html

but as say in the article, parallax shader is "on the more expensive rendering side" ... we can make a game with very good graphism only with diffuse/normal/specular/shadow map wink