This project is read-only.

Picking objects made out of a triangle strip

Feb 16, 2013 at 4:48 PM
Hey guys,

I'm trying to pick models (TransformationNodes which consists of certain GeometryNodes) and I tried to make use of the PickRayCast but its not really working. I've tried to look into the Code of the Domino Game but i dont know how to project this to my project. I have something like a wall which is a TransformationNode. Each side of the wall is a GeometryNode and this node is made out of triangles. So i can access all the TransformationNodes i put on the groundMarkerNode. How can i pick objects like in the Domino Game? Can someone help me ?

best regards

Feb 18, 2013 at 8:12 AM
all of your nodes (transform and geometry) added to only 1 marker?
Feb 18, 2013 at 8:14 AM
yes, all added to 1 single Marker. So the parent for all the GeometryNodes is one always 1 TransformNode. You know what i mean ?
Feb 18, 2013 at 8:18 AM
in this case read this discussion:
Feb 18, 2013 at 8:21 AM

I have already read the discussion but this will not wokr because as you could imagine, for example a wall is made out of 5 GemetryNode which make up one TransformNode to display the wall as a model on the marker. So i cannot simple take the TransformNode since this is not supposed to be added to the physics right ?
I cannot find any options for the physics for the TransformationNode.
Feb 18, 2013 at 8:32 AM
The transformnode has no physics property because this is just for the transformational editing. If you want to pick object in the marker (the 5 geometrynode) you can use the gemoetrynodes, not the transformnodes!
Feb 18, 2013 at 8:34 AM
But everytime i add all the geometrynodes to the physics and i try to pick it the list of pickedObjetcs in only 1 and the only object in the list is the groundNode. How is that possible ?
Feb 18, 2013 at 8:35 AM
Am i missing something ?

I do pretty much the same as you mentioned in the thread. I add all the GeometryNodes to the physics and make it pickable. Do i also have to set the shape ? is that nessecery ? And what do i also need to do ?

Feb 18, 2013 at 8:38 AM
Edited Feb 18, 2013 at 8:39 AM
if your groundnodes are gemoetrynodes then don't add theese geometrynodes to the physics.
groundNode.AddToPhysicsEngine = false;
or if you dont set this parameter, it originally false. if it not solves your problem, post your code here.
Feb 18, 2013 at 9:07 AM
Thanks i ll try this out! Ill be back with an answer.
Feb 22, 2013 at 12:17 PM

well i finally made it that i recieve objects from the raycast. The problem is that if i visualize the bounding box fromthe GemetryNodes such as Box or something similar i can see that the boxes are not right in place of the object itself. There is an offset between the bounding box and the object. How is that possible ? Another thing is that i can sometimes see the bounding box when i select Convec Hull (and this works fine then and the bounding box is also right in pace) but it always dissapears so if i chose Convex Hull the box is not always visable.

To visualize the bounding box i use :
scene.RenderCollisionMesh = true
Can someone help me ?