Issues Inserting Camera
In my simulation, I insert a camera into my robot. The problem is that when you insert a camera into an entity, and then insert that entity into a another entity, then view from the camera looks strange. If the entity you inserted the camera into is a top-level entity (has no Parent), then there is no problem. I put together a simple example using two boxes and a camera to illustrate the problem
The following code will produce the scene below from the new camera.
SingleShapeEntity parentBox =newSingleShapeEntity(newBoxShape(
newBoxShapeProperties(
100,// mass in kilograms.
newPose(),// relative posenewVector3 (2, 2, 2))),// dimensionsnewVector3(0, 1, -10));
parentBox.State.Name ="ParentBox";
SingleShapeEntity childBox =newSingleShapeEntity(newBoxShape(
newBoxShapeProperties(
100,// mass in kilograms.
newPose(),// relative posenewVector3(3, 3, 3))),// dimensionsnewVector3(0, 1.5f, 0));
childBox.State.Name ="ChildBox";
CameraEntity camera =newCameraEntity(640, 480);
camera.State.Name ="TheCamera";
camera.State.Pose.Position =newVector3(0, 1.5f, 0);//on top of child box
childBox.InsertEntity(camera);
SimulationEngine.GlobalInstancePort.Insert(childBox);
SimulationEngine.GlobalInstancePort.Insert(parentBox);http://farm2.static.flickr.com/1085/1403916726_c967cb3f69.jpg?v=0
Replace the highlighted line with this line, and you get this scene from the new camera.
http://farm2.static.flickr.com/1230/1403916398_5b5810940e.jpg?v=0
As you can see, the sky is no longer visible and the parent box looks distorted when viewed from the camera. If anyone has any suggestions for how to modify the camera to get around this problem, please let me know. Thanks!

