GMU:Tutorials/Networking/Controlling the Camera in Unity with The Captury: Difference between revisions

From Medien Wiki
mNo edit summary
No edit summary
Line 2: Line 2:




<br>[[Image:unity start.png|thumb|left|800px]]
[[Image:unity start.png|thumb|left|800px]]
 
<br style="clear:both">
<br>
 


== 2. create a simple Unity scene.==
== 2. create a simple Unity scene.==
Line 15: Line 13:


[[Image:add new object.png|thumb|left|800px]]
[[Image:add new object.png|thumb|left|800px]]
 
<br style="clear:both">
[[Image:new object in scene.png|thumb|left|800px]]
[[Image:new object in scene.png|thumb|left|800px]]
 
<br style="clear:both">


==3. add component to camera==
==3. add component to camera==
Line 23: Line 21:


[[Image:select camera.png|thumb|left|800px]]
[[Image:select camera.png|thumb|left|800px]]
 
<br style="clear:both">
select camera in hierarchy,single click it.
select camera in hierarchy,single click it.


[[Image:add component.png|thumb|left|800px]]
[[Image:add component.png|thumb|left|800px]]
 
<br style="clear:both">
click the right of table to add component to the camera.
click the right of table to add component to the camera.


[[Image:new script.png|thumb|left|800px]]
[[Image:new script.png|thumb|left|800px]]
 
<br style="clear:both">
select a new script
select a new script


[[Image:script name.png|thumb|left|800px]]
[[Image:script name.png|thumb|left|800px]]
 
<br style="clear:both">
enter a name for this script
enter a name for this script


[[Image:write code.png|thumb|left|800px]]
[[Image:write code.png|thumb|left|800px]]
 
<br style="clear:both">
double click the script in Assets,then you will get a script widow, you can write code in it.
double click the script in Assets,then you will get a script widow, you can write code in it.


Line 48: Line 46:


[[Image:code.png|thumb|left|800px]]
[[Image:code.png|thumb|left|800px]]
 
<br style="clear:both">




Line 54: Line 52:


[[Image:right table.png|thumb|left|800px]]
[[Image:right table.png|thumb|left|800px]]
 
<br style="clear:both">
Then in the right table, you can set the remote IP and the port of the main computer.
Then in the right table, you can set the remote IP and the port of the main computer.