I'm trying to make a space based scene and allow the user to select stars with the mouse. I'm getting stuck on trying to create a TriangleSelector, because the function (createTriangleSelector) wants a mesh, and I am not loading my scene from a mesh. If I pass it 0 for the mesh pointer it returns 0.
So I have two questions:
1) How can I create a triangle selector without associating a mesh?
2) Will this approach even work?
Defining a TriangleSelector without an associated mesh
What are your stars composed of?
Are you just displaying a bitmap with images that look like stars?
Triangle selector requires some sort of mesh, meshes are made
up of triangles. If you are using just a bitmap, you could use the
coordinates of the star images in the bitmap and reference those
coordinates as the stars.
Are you just displaying a bitmap with images that look like stars?
Triangle selector requires some sort of mesh, meshes are made
up of triangles. If you are using just a bitmap, you could use the
coordinates of the star images in the bitmap and reference those
coordinates as the stars.
If you're not making GREAT games
you belong in an institute!
The Game Institute.
www.gameinstitute.com
you belong in an institute!
The Game Institute.
www.gameinstitute.com
Yes, my stars are billboards. I load their positions dynamically based on an XML file. Here's a screenshot:
I would very much like to use the coordinates to build a triangle selector, but I can't figure out how to define that in irrlicht. Is there some way to make define a mesh on the fly without loading it from a file?
I would very much like to use the coordinates to build a triangle selector, but I can't figure out how to define that in irrlicht. Is there some way to make define a mesh on the fly without loading it from a file?
why do you need a triangleselector? you could use ISceneCollisionManager::getSceneNodeFromScreenCoordinatesBB()
for mousepicking, which uses boundingboxes to select the scenenode.
greetings, rincewind
for mousepicking, which uses boundingboxes to select the scenenode.
greetings, rincewind
I'm not sure what a quad or a point sprite is, but yes.. each star image is assigned to it's own node, and there is a node for the center of the galaxy so I can rotate the whole thing if I need to.
I didn't realize that would work if there wasn't a selecter, rincewind. I'll try that, thanks.
I didn't realize that would work if there wasn't a selecter, rincewind. I'll try that, thanks.
Time is the best teacher, unfortunately it kills all it's students.