hi, thanks for the help. Actually i want to make the object selected in 3D environment. so i will provide the button, when the user click on the button they can scale, rotate and move the selected object in the 3D environment.
im having the problem to do the selection of the object, to scale, move and rotate.
ENTITY* selectedEntity = NULL;
function click_event()
{
if (event_type == EVENT_CLICK)
{
selectedEntity = me;
}
}
action myClickableEntity()
{
my.emask |= ENABLE_CLICK;
my.event = mouse_event;
}
function changePosX() {
if (selectedEntity != NULL) {
selectedEntity.x +=1;
}
}
When you click the entity, the selectedEntity pointer will point on the entity you clicked. Then you can scale, rotate or do whatever with the entity by using buttons on a panel.