{"id":12836,"date":"2023-01-02T13:40:40","date_gmt":"2023-01-02T18:40:40","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=12836"},"modified":"2023-01-02T13:40:45","modified_gmt":"2023-01-02T18:40:45","slug":"babylon-js-camera-position","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/babylon-js-camera-position\/","title":{"rendered":"Babylon.js Camera Position Example Code"},"content":{"rendered":"\n
Parameters: name, position, scene.<\/p>\n\n\n\n
var camera = new BABYLON.UniversalCamera("UniversalCamera", new BABYLON.Vector3(0, 0, -10), scene);<\/code><\/pre>\n\n\n\nTargets the camera to a particular position. In this case the scene origin.<\/p>\n\n\n\n
camera.setTarget(BABYLON.Vector3.Zero());<\/code><\/pre>\n\n\n\nAttach the camera to the canvas.<\/p>\n\n\n\n
camera.attachControl(canvas, true);<\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,23,25,27,15,16],"tags":[33,1216,328,424,433,449,544,591],"yoast_head":"\nBabylon.js Camera Position Example Code [Snippet]<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n