Jump to content

CAMERAS in scene ... ( set name | active )


Recommended Posts

Posted

[1] 

When you have one camera in scene then is possible rename camera in inspector.

But when you add second camera to scene and name is changed on second camera too, from this moment you can't rename any cameras in inspector.

 

EDIT: Try delete first chars from entity name and pres ENTER => name is not changed, but when you add char at end, then name is changed. Looks like name is change only if char is added, but not when is any deleted.

[2] 
When you have i.e. 2 cameras in scene, then first added camera is MAIN (it's OK), but when this camera is set to hidden in inspector, then second added camera is not automaticaly activated for projection after run map. I tried this fix in script but 

...
local entities = game.world:GetEntities()
for n = 1, #entities do
    print(entities[n].name)
    if entities[n].name == "DebugCamera" then
        print("DEBUG camera exist ...")        
        entities[n]:SetProjectionMode(PROJECTION_PERSPECTIVE)
    end
    if entities[n].name == "Camera" then
        print("MAIN camera exist ...")        
        entities[n]:SetProjectionMode(PROJECTION_NONE)
    end
end
...

vhere n is ID to second camera, script crash with error attempt to call a nil value (method 'SetProjectionMode')

  • Thanks 1

"... programmig is art ..."

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...