I have a couple problems I wanted to see if anyone could help me with.http://i.imgur.com/6wPOn.jpg
Number 1: Is there a way to have text in the game world rather than on the gui so it will display a number below a building even when you are moving the camera?
Number 2: The objects in my game look like they are leaning a lot when they get close to the edges of the camera. Any idea how to fix this or is this just how it will look. (this is more a problem that my professor has than I do) Heres a screenshot.
Number 3: Is there a way to change the bounding boxes of objects in jmonkey?
Thank you all.
Thank you. I will get on trying that for number 1 and 2. I didnt know about the worldToScreen function.
For number 3, its the fact that I have to physically click on that tower to move it. My professor feels its too difficult to actually click on it so he wanted me to find a way so you dont have the spaces between the metal beams that dont allow you to click on it. So I wanted to see if there was a way to create a new bounding box around it somehow or something to fix that problem.
I don’t understand, you don’t have to hit the actual geometry, the whole bounding box should be clickable as long as you don’t just check for geometry being hit. So you should get a collision for the node as well.
Maybe I am checking the geometry not the bounding boxes. I dont see a way to be checking the bounding boxes. The only one I see is getCollision(0).getGeometry();
Also, the setParallelProjection() function didnt fix anything. I tried making it true and false and it was the same either way.
Well a crappy workaround would be a invisible box attached to the tower XD
The better way would be to find out how to do the collision checks based on boundingbox, ot alternativly modify the model to not have actual beams, but semi transaprent textures with the beams on it at the sides.
I didnt make the model nor am I able to get in touch with my friend who did. I was actually considering an invisible box too haha. Its fine. Ill figure it out or tell him I cant do anything.
Any other idea for my camera issue?
Im using the flyCam if that makes any difference.
If you want to allow collision in between the beams then you don’t want to edit the bounding box, you want to use the bounding box for collision instead of the actual geometry. In that case, you need BoundingVolume.intersects(Ray).
For parallel projection, see TestParallelProjection example
Can I get the bounding volume from the raycast?
lol, you get a geometry, it has as getWorldBounds() method :roll: