couple of noob questions :P

klarax

25-09-2009 10:13:59

Hi guys,

just got through NxOgre tutorial 7, where using own meshes in a scene to do phyiscs.

so my questions are:

1) are triangleMeshes static in the scene? i.e. do they move when physics is applied to a scene. or is that what the convexMeshes are for? reason I ask is cos my triangle meshes aren't moving...

2) how can I apply a texture to a convex mesh ?

Thanks.

betajaen

25-09-2009 10:26:52

1.

Yep, they are static they never move.

In BloodyMess Static Actors are called SceneGeometries, they can use TriangleGeometries, Heightfield Geometries, and the other shapes (cube/sphere/capsule/convex). They can't be destroyed within the Scene's lifetime either. If you want something that is static-like, then have a look at Kinematic Actors - except they can't use TriangleGeometries.

Convex meshes are convex shapes, they can be used in normal Actors/Bodies, as well as KinematicActors and StaticGeometries.

They can only have a certain limit of vertices; so can't be to complicated. But they are usually used for barrells (anything cylinder like), ramps, pyramids, etc.

2.

Pretty much a Ogre question there. But assuming you have a Ogre Material;

mBody->getEntity()->setMaterial("myMaterial");

klarax

26-09-2009 17:59:16

Many thanks man, much appreciated

with regards to question 2, i was only asking cos its rendering black, so must be something else, cos im doing what you said to do :) might be the way i exported the mesh and material or something.

Thanks again

Klarax.

betajaen

26-09-2009 18:42:03

with regards to question 2, i was only asking cos its rendering black, so must be something else, cos im doing what you said to do :) might be the way i exported the mesh and material or something

It could be. Try it again, and see what you get. Otherwise run it through the MeshMagick optimiser to clean up any normals, extra vertices, etc.