Using the CameraSpriteEntity from the Visual Simulation Engine
- Start a simulation with a robot with a camera (for instance a Pioneer 3DX)
- Go to Edit mode (Mode menu, choose edit)
- Entity Menu -> New...
- Choose CameraSprite, and as a parent the "robocam"
- Set Height and Width (e.g. both to 0.5 meter)
- Set Initial Pos (0,1,0) is 1 meter above the parent
- Pivot Y-axis or Center to make the view visible while turning the robot
- Press "OK" and choose "Mode -> Run"
Using the CameraSpriteEntity from code
1
2
3
4
|
CameraSprite camSprite = new CameraSprite(0.5f, 0.5f, SpritePivotType.Center, 0,
new Vector3(0, 1, 0));
camSprite.State.Name = "cameraSprite";
camera.InsertEntity(camSprite); |
back
Posted
28-07-2008 16:19
by
Erik Oppedijk