Forum

User posts Carlos
07 December 2017 18:34
I've a scene where the camera goes to several spots and where the focus goes to another Target.
The camera is in Target mode. I want to set several camera limits (horizontal panning limits/zoom limits/e.g.).
However I can't seem to get it to work. I tried it with nodes which will activate upon buttonclick. But no luck.

Is it possible to set different (zoom) limits e.g. in Javascript when a camera has reached his destination and looks at the target? The following code is the button action for the moment:

   var test_1 = create_button("Start");
    test_1.onclick = "Start";
    controls_container.appendChild(test_1);
	test_1.className = "btn 1";
	test_1.addEventListener("click", function(e) {
	
		var cam_obj = m_scenes.get_active_camera();

        var final_cam_pos_obj = m_scenes.get_object_by_name("cam_2");
        var final_target_obj = m_scenes.get_object_by_name("tar_2");

        rotate_final_cam_pos_object_to_final_target(final_cam_pos_obj, final_target_obj);

        m_cam.static_setup(cam_obj);

        var set_target_mode = function() {
            var target = m_trans.get_translation(final_target_obj, _vec3_tmp2);
            m_cam.target_setup(cam_obj, {pivot : target});
        }

        m_cam_anim.move_camera_to_point(cam_obj, final_cam_pos_obj, 5.0, 50, set_target_mode);
		m_logic_n.run_entrypoint("Scene", "scene1");
    }, false);


Much appreciated!
07 December 2017 18:05
Awesome! So simple… Thank you
06 December 2017 13:10
Hi,

I've colored water in a Cylinder. However I want to mix colors (from red at the bottom and blue at the top).
But whatever I do it is messing up the water. How can I mix the water texture and the colors at the same time?

Blend file attached: MixedColoredWater.blend
30 November 2017 14:31
Unfortunately I can't attach the blend file..
And it's completely built with geometry instead of texture.
30 November 2017 10:24
So, I've got a case of pixelation.
Is it possible to get rid of this pixelation when a model is zoomed out?

No zoom:


With zoom: