Tutorial 8 - Hello Picking exercise 3

Looking for tutorial 8 - Exercise 3: Pick up into Inventory solution.

If someone has it post it please

Have you made any attempts at this yet? Post what you have so far! (people will help you, but won’t just give you the code)

Gustavo Borbas? Is that you?

Hello!









[java]

for (int i=0; i < chunkMap.getMap().size(); i++) {

// I save data in HashMap



// get key from HashMap

Vector3f key = (Vector3f)chunkMap.getMap().keySet().toArray();



// get value from HashMap

Chunk ch = (Chunk)chunkMap.getMap().values().toArray();

Mesh val = ch.createMeshChunkMesh();



// Create geometry from CustomMesh

Geometry geom = createGeometry(val, ch.getChunkLabel(key));



// And attache to the root node…

rootNode.attachChild(geom);

}[/java]



I attached to the rootNode 2 custom mesh.



https://dl.dropbox.com/u/553098/original_owely20121109-14837-4cqa3g.png



What output I have expected:



[java]


Collisions? 4
* Collision #0
You shot (15.0, 9.0, 15.0) at (3.4524662, 1.6910603, 15.5), 9.983307 wu away.
* Collision #1
You shot (15.0, 9.0, 15.0) at (4.7679253, 3.4064124, -0.4999981), 26.128672 wu away
.[/java]



What output I have catch

[java]
Collisions? 4
* Collision #0
You shot (31.0, 9.0, 15.0) at (3.4524662, 1.6910603, 15.5), 9.983307 wu away.
* Collision #1
You shot (15.0, 9.0, 15.0) at (3.4524662, 1.6910603, 15.5), 9.983307 wu away.
* Collision #2
You shot (31.0, 9.0, 15.0) at (4.7679253, 3.4064124, -0.4999981), 26.128672 wu away.
* Collision #3
You shot (15.0, 9.0, 15.0) at (4.7679253, 3.4064124, -0.4999981), 26.128672 wu away.[/java]



P.S.
(31.0, 9.0, 15.0) was added last to the rootNode

seems somewhere my mistake :frowning: