paul.w Posted April 24, 2014 Share Posted April 24, 2014 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 Link to comment
silent Posted May 5, 2014 Share Posted May 5, 2014 Hi Paul, Please, check sample test scene in the attachement. If you have some questions left, please, don't hesitate to post it here :) test_sprite_viewport.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts