cor Posted September 19, 2011 Share Posted September 19, 2011 Hi I'm rather new to Unigine, so I hope you do not mind if this is a stupid question. I would like to display the frustum. If I understand correctly, this can be done using the visualizer. But I do not know how this is supposed to work. Can I add a visualizer using the script and call the renderFrustun function during rendering? Can I move the visualizer using mouse and keyboard so that I can watch the frustum from different directions? If so, how do I switch from controlling visualizer and player? Link to comment
steve3d Posted September 20, 2011 Share Posted September 20, 2011 it's a bit complicated, first, you don't need add a visualizer, because these functions exists in engine.visualizer.xxx just call it, and you need to call your renderFrustum function every frame, once you stop calling it, then it won't be drawn. second and third, there would be a lot of scripting work to move the visualizer. anyway, In unigine, you don't need to create player in editor, just use world script to create player, it's much easier to play with. Link to comment
cor Posted September 20, 2011 Author Share Posted September 20, 2011 Thanks Steve, But will I be able to look at the frustum of the player from a different view point? Link to comment
cor Posted September 20, 2011 Author Share Posted September 20, 2011 I did add two PlayerSpectator objects to the world using the script and displayed both frustums. But that doesn't work very well. Both players seem to be controlled by the mouse and keyboard simultaneously. I want to move only one player so that I can see the frustum of the other from different view points. So I changed one to a PlayerDummy. That works! The dummy player does not move and I can move with the other player and take a look at the frustum of the dummy player. thanks for the advise! Link to comment
Recommended Posts