Jump to content

How to use the visualizer


photo

Recommended Posts

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

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

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
×
×
  • Create New...