Page 1 of 1
LuaGuiElement type camera does not work
Posted: Tue Jun 06, 2017 9:20 am
by aaaaaaaaaaaaaaaaaa8
Suppose I want to create a camera on an entity position. Given surface, entity and frame, I used
Code: Select all
frame.add{
type="camera",
name="entity_camera",
position=entity.position,
surface_index=surface.index
}
It does not show anything. How do I make it show the camera? Thanks
Re: LuaGuiElement type camera does not work
Posted: Tue Jun 06, 2017 10:53 am
by Pandemoneus
I recommend you take a look at Factorissimo 2, in control.lua, lines 869-873.
Re: LuaGuiElement type camera does not work
Posted: Tue Jun 06, 2017 1:14 pm
by Klonan
aaaaaaaaaaaaaaaaaa8 wrote:Suppose I want to create a camera on an entity position. Given surface, entity and frame, I used
Code: Select all
frame.add{
type="camera",
name="entity_camera",
position=entity.position,
surface_index=surface.index
}
It does not show anything. How do I make it show the camera? Thanks
You will need to give the element style a minimal width and minimal height