Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
var node_to_be_found = ccbGetSceneNodeFromName("cubeMesh1"); //This works. var node_position = ccbGetSceneNodeProperty(node_to_be_found, "Position"); //This works. //var screen_position = ccbGet2DPosFrom3DPos(node_position ); //This should work but it doesn't, This makes me cry ! var screen_position = ccbGet2DPosFrom3DPos(node_position.x, node_position.y, node_position.z); //Because the top method doesn't work, you have to manually set it like this, this makes me cry ! //Make sure Overlay's Position Mode is set to absolute (pixels) in this example: ccbSetSceneNodeProperty(ccbGetSceneNodeFromName("2D Overlay1"), "Pos X (pixels)", screen_position.x); //This works. ccbSetSceneNodeProperty(ccbGetSceneNodeFromName("2D Overlay1"), "Pos Y (pixels)", screen_position.y); //This works. |
|