GetSceneNodeFromScreenCoordinatesBB on Billboard mostly null

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.

GetSceneNodeFromScreenCoordinatesBB on Billboard mostly null

Postby NewYoda » Sat Sep 17, 2005 12:11 pm

Hi,

there are a lot of GetSceneNodeFromScreenCoordinatesBB-Threads out there but I didn't find an answer for my question:
I try to use it to detect the selection of billboards with the mouse cursor. However, the function mostly returns null allthough the mouse is over one of my billboards. I call it with every mouse event. I checked the mouse position, it's correct. I use the standard viewport. If I move the mouse over my billboard very often, it sometimes returns my scenenode. Why does the function mostly return null and sometimes my billboard scenenode?

Code: Select all

public bool OnEvent(Event e)
{
           
            switch (e.Type)
            {
                case EventType.KeyInput:
                    KeyInput(e);
                    break;
                case EventType.MouseInput:
                    MouseInput(e);
                   
                    break;
            }
            return true;
}

private void MouseInput(Event e)
{
            mousepos = e.MousePos;
            Console.WriteLine(mousepos.X+";"+mousepos.Y);
            ISceneNode selnode = scene.SceneCollisionManager.GetSceneNodeFromScreenCoordinatesBB(mousepos, 0);
            if (selnode != null)
            {
                selectednode = selnode;
                Console.WriteLine(selectednode.Name);
            }   
}


tia



i'm sorry about my bad english
NewYoda
 
Posts: 4
Joined: Sat Sep 17, 2005 11:28 am
Location: Thüringen

Postby niko » Sun Sep 18, 2005 7:30 am

It looks like the .NET version still has some problems. I'm going to fix it, and rewrite the original function anyway for the next release.
User avatar
niko
Site Admin
 
Posts: 1758
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria

Postby Guest » Sun Sep 25, 2005 4:31 pm

THX!

is there any workaround I can use until the next release?
Guest
 

Postby NewYoda » Tue Sep 27, 2005 4:11 pm

oh, I forgot to login...
btw my BillboardSceneNode's Bounding Box is allways 2x2x2
NewYoda
 
Posts: 4
Joined: Sat Sep 17, 2005 11:28 am
Location: Thüringen


Return to Irrlicht.NET

Who is online

Users browsing this forum: No registered users and 1 guest