由用户创建的信息 AemnAnsMaequia
06 July 2015 18:54
I need the Canvas to be smaller than the html page (80% width, 80% height), but now the objects get selected when clicking in other parts of the canvas.
I noticed m_mouse.get_coords_x(e) and m_mouse.get_coords_y(e) are returning values using the whole browser window, is there a way of making those return values using the relative space of the canvas and not the window?
I noticed a function called client_to_canvas_coords(x, y, dest), how does this work?
I noticed m_mouse.get_coords_x(e) and m_mouse.get_coords_y(e) are returning values using the whole browser window, is there a way of making those return values using the relative space of the canvas and not the window?
I noticed a function called client_to_canvas_coords(x, y, dest), how does this work?
02 July 2015 15:49
02 July 2015 15:31
I have a source object in mi scene, and I need to be able to copy up to 7 copies of that object (that's no problem)
but how can I delete the selected ones?
I'm trying to use:
but the id always returns as zero. The whole scene is deleted!
but how can I delete the selected ones?
I'm trying to use:
id = m_scenes.get_object_data_id(_selected_obj);
if(id > 0){
m_data.unload(id);
_selected_obj = null;
}
but the id always returns as zero. The whole scene is deleted!
26 June 2015 13:15
Yes, I was trying with shape keys at first, and it was working ok. But then I didn't know how to calculate the distance between the new height of the box (think of it as a pile of books) and the next box on top of it.
let's imagine I have 4 boxes in a column, and I need to change the first box's height (the one in the bottom) using shape keys, thats easy, and tranlating the rest of the boxes in the Z-axis, that's easy too, but, How can I calculate how much I need to move boxes 2, 3 and 4? If I had a way of knowing the real height after the shape key change, this would be easy too…
let's imagine I have 4 boxes in a column, and I need to change the first box's height (the one in the bottom) using shape keys, thats easy, and tranlating the rest of the boxes in the Z-axis, that's easy too, but, How can I calculate how much I need to move boxes 2, 3 and 4? If I had a way of knowing the real height after the shape key change, this would be easy too…
24 June 2015 20:48
Ok, so I need to something like this: from 1 to 7 seven boxes making a pile. (I can make deep copies, that's ok)
But I should be able to change the height for each box, and then if needed, place a new box over the previous one…
It should be like: Z position of BOX 2 = (Z position of BOX 1) + (height of BOX 1)
where the height of BOX 1 could vary
I have tried this using shape keys and visually it works, but the returned height of the object is always the same!
Should I try bone deformation? and how I could get the bone absolute position? (the bone position should give me the position for spawning a new box on top of the original)
But I should be able to change the height for each box, and then if needed, place a new box over the previous one…
It should be like: Z position of BOX 2 = (Z position of BOX 1) + (height of BOX 1)
where the height of BOX 1 could vary
I have tried this using shape keys and visually it works, but the returned height of the object is always the same!
Should I try bone deformation? and how I could get the bone absolute position? (the bone position should give me the position for spawning a new box on top of the original)
24 June 2015 18:57