[SOLVED] IG::Iview's player


photo

Recommended Posts

Is there a way to register players already in the world as IViews of IG?

 

// objects (create if it does not exist yet)
		virtual IView* getView(int view_id) = 0;

There is a way to create IView in IG Manager, but I would like to register the camera created in advance in the Editor as IView.

Link to post

unfortunately there is no easy way to do this

you can apply Player's modelview and projection to View


since 2.12 you can use
ViewBase::copyTransformFromPlayer() // modelview
View::copyDefinitionFromPlayer() // projection

before 2.12 only through 
ViewBase::setPosition 
ViewBase::setRotation
View::setDefinition

  • Like 1
Link to post
  • 1 month later...

hi.

 

Do I have to copy post material separately?

Link to post

materials will not be copied

you need to use View::setType 

you can predefine type of view in the ig_config.xml

	<view_types>
		<view_type type="1" post_materials="post_sensor_heat"/>
		<view_type type="2" post_materials="post_sensor_green"/>
		<view_type type="3" post_materials="post_sensor_white"/>
		<view_type type="4" post_materials="post_sensor_red"/>
		<view_type type="5" post_materials="post_sensor_white,post_sensor_heat"/>
	</view_types>

 

  • Like 1
Link to post

If I want to remove post material after using setViewType, what should I use?

Link to post
19 hours ago, dongju.jeong said:

If I want to remove post material after using setViewType, what should I use?

I didn't understand what you want to do
disable post materials? setViewType(0)

  • Like 1
Link to post
  • silent changed the title to [SOLVED] IG::Iview's player