McTomas
Member
|
ScreenToPos() problem
Hi
Before the last engine update, the ScreenToPos() method worked in every part of the code. Now, with the last update, ScreenToPos() only works properly in the Draw() code part.
If I use ex: ScreenToPos(Vec2(0,-0.9)) in the Init() code part, it will always give me a zero Vec().
Ex:
Code:
Vec pos;
Bool Init()
{
pos = ScreenToPos(Vec2(0,-0.9));
return true;
}
void Shut()
{
}
/******************************************************************************/
Bool Update()
{
return true;
}
void Draw()
{
D.clear(BLACK);
D.text(0,0,S+pos);
}
Probably I'm doing something wrong, but before the update my code was working fine.
Best Regards,
McTomas
(This post was last modified: 04-01-2010 02:09 AM by McTomas.)
|
|
04-01-2010 02:03 AM |
|
Esenthel
Administrator
|
RE: ScreenToPos() problem
Hello,
Thanks for reporting the issue, I'll fix this for the next version.
In the meantime you can try calling
Code:
Bool Init()
{
D.viewRect(NULL);
here rest of the codes
|
|
04-01-2010 03:09 AM |
|
McTomas
Member
|
RE: ScreenToPos() problem
thank you
|
|
04-01-2010 03:09 PM |
|