Hi
If my Player is set to :
player = new PlayerSpectator();
player.setPosition(Vec3(0.0f,0.0f,0.0f));
player.setDirection(vec3(-1.0f,0.0f,-0.5f));
player.setMinVelocity(20.0f);
player.setMaxVelocity(40.0f);
engine.game.setPlayer(player);
AND my WidgetSpriteNode & ObjectMeshSkinned is set to:
spriteWithAnim = new WidgetSpriteNode(gui, screenSizeW, screenSizeH); //change these back
spriteWithAnim.setNode(spriteWithAnimNode);
ObjectMeshSkinned mesh = add_editor(new ObjectMeshSkinned("data/all_unigine_newgame/meshes/Nut_Mesh_All.smesh"));
mesh.setMaterial("hazelnut","*");
mesh.setProperty("surface_base","*");
spriteWithAnimNode = mesh;
spriteWithAnim.setNode(spriteWithAnimNode);
spriteWithAnim.setOrder(4);
gui.addChild(spriteWithAnim,GUI_ALIGN_OVERLAP);
What will be the setProjection and setModelview so the model is facing the player; see image:
PLUS how to make the spriteWithAnim background transparent? (at moment its black)
Thanks
Paul