Camera
Last updated
Last updated
All Mobile phones have Cameras, usually a Front and a Rear Camera. This set of Action does not create an Augmented reality app where virtual Objects are placed in the real world, but allows the camera view to be placed on a Surface, thereby placing Real World objects in a Virtual World.
The following Actions have been included in the Asset.
Action Name
Description
Start Webcam
This Actions adds a camera view to a Texture surface
Show Webcam
Starts the Camera View on a Texture surface
Stop Webcam
Stops the Camera View on a Texture surface
Set Adv Camera Sensitivity
Sets the sensitivity needed for Camera Touchsticks
Set Fps Camera Sensitivity
Sets the sensitivity needed for Camera Touchsticks
Zoom Adventure Camera
Zooms the Adv Camera when used with Touch Triggers
The Start, Show and Stop Webcam Actions allow for the use of Front or Rear Cameras on a Mobile, and a Desktop Webcam when run a a Desktop or Laptop computer. This is selected from the dropdown in the Action. The Target Object is any object with a Mesh, usually a Plane. The Action will automatically create a WebCamTexture on the Object.
For more information on Webcam Actions, see Example 2 - Cameras.
The two Actions for Camera Sensitivity are used to set the amount of drag needed top move the Adventure and First Person Camera on a Mobile device. They can be used to adjust the drag when defaulting to the touch drag of Game Creator, and are needed when a Touchstick for Camera is used. The sensitivity can be set from a Slider in the Inspector or can be set from a Game Creator Variable.
When using a Camera Touchstick, set the sensitivity to the maximum of 100. For more information on Sensitivity Actions, see Example 4 - Controls.
The final Action in this section is Adventure Camera Zoom. This Action has been created to allow for Zooming the Adventure Camera when using touch gestures such as Pinch In and Pinch Out.
The sensitivity of the Zoom can be set using the Slider and the values are from 0.1 to 1.0. If Zoom In check box is NOT checked, the Camera will Zoom Out. To use this Action, create a Trigger and add the On Pinch Trigger, selecting the required direction and area of the screen.
The above image shows an On Pinch trigger, for a Pinch Inwards gesture within the middle half of the screen.
For more information on Zoom Actions and Pinch Triggers, see Example 3 - Gestures.