angus.wood Posted April 24, 2014 Share Posted April 24, 2014 Hi, I feel I'm missing something simple here, but when call setPosition on the camera it does not seem to do anything. Player player = engine.game.getPlayer(); vec3 campos = player.getPosition(); if (toggle == 0) { campos.x += 10; }else{ campos.x -= 10; } player.setPosition(campos); Link to comment
silent Posted April 25, 2014 Share Posted April 25, 2014 Hi Angus,I'm afraid minimal working test scene is required. I've mode one scene which is working fine, please check the attachement (use x and z buttons to move player camera). Also, if you are want to use setDIrection and setViewDirection in future, please check this topic first: https://developer.unigine.com/forum/topic/1617-solved-transform-and-position-bug/?hl=setPosition#entry8594 camera.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
angus.wood Posted April 30, 2014 Author Share Posted April 30, 2014 Thanks. The issue was that I'd added two cameras to the scene (engine.editor and engine.game). I was updating one but looking through the other. Sorry for wasting your time. [sOLVED] Link to comment
Recommended Posts