The function GUI.WorldPosToScreen seems broken to me. I'm trying to make a 2D text label in 3D space, but when I use this function to change the label's position, it seems infnitely far away.
Labul <- GUILabel();
function Script::ScriptLoad()
{
Labul.Text = "I LOVE IMKIKI"
Labul.FontSize = 15;
Labul.Pos3D = Vector(497, -89.49429, 14);
//Labul.Rotation3D = Vector(2.0, 0, 3.1);
Labul.Size3D = Vector(4, 5.0, 5.0);
}
function Script::ScriptProcess() {
local wpts = GUI.WorldPosToScreen(Labul.Pos3D);
Labul.Pos = VectorScreen(wpts.X, wpts.Y);
}
Wouldn't the label seem to be "infinitely far away" as its going to be visible anyway, wherever you are in the whole map since it will draw it on your screen. If I understood you correctly, then you need to add a distance check before its displayed and a little calculation to manage the label size. Make an inverse proportion of the size and distance of player from the position where you are creating the label.
Labul <- GUILabel();
function Script::ScriptLoad()
{
Labul.Text = "I LOVE vcmp"
Labul.FontSize = 15;
Labul.Pos3D = Vector(497, -89.49429, 14);
Labul.Rotation3D = Vector(2.0, 0, 3.1);
Labul.Size3D = Vector(4, 5.0, 5.0);
}
function Script::ScriptProcess() {
local wpts = GUI.WorldPosToScreen(Labul.Pos3D);
Labul.Pos = VectorScreen(wpts.X, wpts.Y);
} where to add color in this label and how o set vectors of difrnt locations
Quote from: MEGAMIND on Dec 28, 2016, 09:57 PMLabul <- GUILabel();
function Script::ScriptLoad()
{
Labul.Text = "I LOVE vcmp"
Labul.FontSize = 15;
Labul.Pos3D = Vector(497, -89.49429, 14);
Labul.Rotation3D = Vector(2.0, 0, 3.1);
Labul.Size3D = Vector(4, 5.0, 5.0);
}
function Script::ScriptProcess() {
local wpts = GUI.WorldPosToScreen(Labul.Pos3D);
Labul.Pos = VectorScreen(wpts.X, wpts.Y);
} where to add color in this label and how o set vectors of difrnt locations
where do I add color to label?? And how do I add color to it
Quote from: MEGAMIND on Dec 29, 2016, 10:24 PMQuote from: MEGAMIND on Dec 28, 2016, 09:57 PMLabul <- GUILabel();
function Script::ScriptLoad()
{
Labul.Text = "I LOVE vcmp"
Labul.FontSize = 15;
Labul.Pos3D = Vector(497, -89.49429, 14);
Labul.Rotation3D = Vector(2.0, 0, 3.1);
Labul.Size3D = Vector(4, 5.0, 5.0);
}
function Script::ScriptProcess() {
local wpts = GUI.WorldPosToScreen(Labul.Pos3D);
Labul.Pos = VectorScreen(wpts.X, wpts.Y);
} where to add color in this label and how o set vectors of difrnt locations
where do I add color to label?? And how do I add color to it
Did you just quote yourself? DAFUQ ;D
Quote from: jWeb on Dec 29, 2016, 10:59 PMQuote from: MEGAMIND on Dec 29, 2016, 10:24 PMQuote from: MEGAMIND on Dec 28, 2016, 09:57 PMLabul <- GUILabel();
function Script::ScriptLoad()
{
Labul.Text = "I LOVE vcmp"
Labul.FontSize = 15;
Labul.Pos3D = Vector(497, -89.49429, 14);
Labul.Rotation3D = Vector(2.0, 0, 3.1);
Labul.Size3D = Vector(4, 5.0, 5.0);
}
function Script::ScriptProcess() {
local wpts = GUI.WorldPosToScreen(Labul.Pos3D);
Labul.Pos = VectorScreen(wpts.X, wpts.Y);
} where to add color in this label and how o set vectors of difrnt locations
where do I add color to label?? And how do I add color to it
Did you just quote yourself? DAFUQ ;D
its noot mine but still its colorless.....!
Try using this: [#ff320f] Note: This is just an example, Google color codes or something like that.
Quote from: Radon on Jan 05, 2017, 02:19 PMTry using this: [#ff320f] Note: This is just an example, Google color codes or something like that.
You also need GUI_FLAG_
somethingCTRL