<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Looking around the inside of a Sphere</title>
	<atom:link href="http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/feed/" rel="self" type="application/rss+xml" />
	<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/</link>
	<description>Papervision3D, ActionScript, and Flex examples and tutorials by John Lindquist</description>
	<lastBuildDate>Fri, 30 Jul 2010 10:38:34 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tony</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-16094</link>
		<dc:creator>Tony</dc:creator>
		<pubDate>Thu, 07 Jan 2010 21:13:19 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-16094</guid>
		<description>Flex Example:




	
		
	
	
</description>
		<content:encoded><![CDATA[<p>Flex Example:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AT</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-13726</link>
		<dc:creator>AT</dc:creator>
		<pubDate>Wed, 02 Dec 2009 04:08:12 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-13726</guid>
		<description>Hi, Im really appreciate that you made this website. It&#039;s really useful for me.

I have a question here, i have no problem to follow your example here and make a sphere that will allow me looked inside it; but when i tried to add an image inside of it then i got a problem.

the only thing i&#039;m able to see in the sphere is only a red square of thing. i assumed that&#039;s the indicator for the mouse, though it wouldn&#039;t move around in this test like the example i&#039;ve tried earlier.

when i tried to zoom out a bit, then i&#039;m able to see the image i&#039;ve pasted. its outside that sphere, but i still wouldn&#039;t be able to move rotated the sphere what soever.

here is what i have wrote..

package
{
	import flash.events.Event;
	import flash.ui.Mouse;
	
	import org.papervision3d.core.proto.MaterialObject3D;
	import org.papervision3d.core.utils.Mouse3D;
	import org.papervision3d.materials.ColorMaterial;
	import org.papervision3d.materials.special.CompositeMaterial;
	import org.papervision3d.materials.BitmapFileMaterial;
	import org.papervision3d.materials.utils.MaterialsList;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.objects.primitives.Plane;
	import org.papervision3d.objects.primitives.Sphere;
	import org.papervision3d.view.BasicView;
	import org.papervision3d.view.layer.ViewportLayer;
	import org.papervision3d.view.layer.util.ViewportLayerSortMode;
	
	public class space extends BasicView
	{
		private var lookAtMe;DisplayObject3D;
		private var sphere:Sphere;
		private var mouse3D:Mouse3D;
		private var plane:Plane;
	
		public function space ()
		{
			viewport.interactive = true;
			mouse3D = viewport.interactiveSceneManager.mouse3D;
			Mouse3D.enabled = true;
			
			lookAtMe = new DisplayObject3D();
			
			var bitmapFileMaterial:CompositeMaterial = new CompositeMaterial();
			bitmapFileMaterial.interactive = true;
			bitmapFileMaterial.doubleSided = true;
						
			sphere = new Sphere(new BitmapFileMaterial(&#039;sky2.jpg&#039;), 400, 12, 12);
						
			var planeMaterial:MaterialObject3D = new ColorMaterial(0xcc0000);
			planeMaterial.doubleSided = true;
			plane = new Plane(planeMaterial, 50, 50);
			
			var viewportLayer:ViewportLayer = new ViewportLayer(viewport, plane);
			viewportLayer.layerIndex = 1;
			
			viewport.containerSprite.sortMode = ViewportLayerSortMode.INDEX_SORT;
			viewport.containerSprite.addLayer(viewportLayer);
			
			scene.addChild(plane);
			
			camera.z =  -300;
			camera.target = lookAtMe;
			
			scene.addChild(sphere);
			
			startRendering();
			
			Mouse.hide();
			
		}
		
		override protected function onRenderTick(event:Event=null):void
		{
			lookAtMe.x += (mouse3D.x - lookAtMe.x) * .009;
			lookAtMe.y += (mouse3D.y - lookAtMe.y) * .009;
			
			plane.copyTransform(mouse3D);
			
			super.onRenderTick(event);
}		
}
}

please let me know i have done wrong.</description>
		<content:encoded><![CDATA[<p>Hi, Im really appreciate that you made this website. It&#8217;s really useful for me.</p>
<p>I have a question here, i have no problem to follow your example here and make a sphere that will allow me looked inside it; but when i tried to add an image inside of it then i got a problem.</p>
<p>the only thing i&#8217;m able to see in the sphere is only a red square of thing. i assumed that&#8217;s the indicator for the mouse, though it wouldn&#8217;t move around in this test like the example i&#8217;ve tried earlier.</p>
<p>when i tried to zoom out a bit, then i&#8217;m able to see the image i&#8217;ve pasted. its outside that sphere, but i still wouldn&#8217;t be able to move rotated the sphere what soever.</p>
<p>here is what i have wrote..</p>
<p>package<br />
{<br />
	import flash.events.Event;<br />
	import flash.ui.Mouse;</p>
<p>	import org.papervision3d.core.proto.MaterialObject3D;<br />
	import org.papervision3d.core.utils.Mouse3D;<br />
	import org.papervision3d.materials.ColorMaterial;<br />
	import org.papervision3d.materials.special.CompositeMaterial;<br />
	import org.papervision3d.materials.BitmapFileMaterial;<br />
	import org.papervision3d.materials.utils.MaterialsList;<br />
	import org.papervision3d.objects.DisplayObject3D;<br />
	import org.papervision3d.objects.primitives.Plane;<br />
	import org.papervision3d.objects.primitives.Sphere;<br />
	import org.papervision3d.view.BasicView;<br />
	import org.papervision3d.view.layer.ViewportLayer;<br />
	import org.papervision3d.view.layer.util.ViewportLayerSortMode;</p>
<p>	public class space extends BasicView<br />
	{<br />
		private var lookAtMe;DisplayObject3D;<br />
		private var sphere:Sphere;<br />
		private var mouse3D:Mouse3D;<br />
		private var plane:Plane;</p>
<p>		public function space ()<br />
		{<br />
			viewport.interactive = true;<br />
			mouse3D = viewport.interactiveSceneManager.mouse3D;<br />
			Mouse3D.enabled = true;</p>
<p>			lookAtMe = new DisplayObject3D();</p>
<p>			var bitmapFileMaterial:CompositeMaterial = new CompositeMaterial();<br />
			bitmapFileMaterial.interactive = true;<br />
			bitmapFileMaterial.doubleSided = true;</p>
<p>			sphere = new Sphere(new BitmapFileMaterial(&#8217;sky2.jpg&#8217;), 400, 12, 12);</p>
<p>			var planeMaterial:MaterialObject3D = new ColorMaterial(0xcc0000);<br />
			planeMaterial.doubleSided = true;<br />
			plane = new Plane(planeMaterial, 50, 50);</p>
<p>			var viewportLayer:ViewportLayer = new ViewportLayer(viewport, plane);<br />
			viewportLayer.layerIndex = 1;</p>
<p>			viewport.containerSprite.sortMode = ViewportLayerSortMode.INDEX_SORT;<br />
			viewport.containerSprite.addLayer(viewportLayer);</p>
<p>			scene.addChild(plane);</p>
<p>			camera.z =  -300;<br />
			camera.target = lookAtMe;</p>
<p>			scene.addChild(sphere);</p>
<p>			startRendering();</p>
<p>			Mouse.hide();</p>
<p>		}</p>
<p>		override protected function onRenderTick(event:Event=null):void<br />
		{<br />
			lookAtMe.x += (mouse3D.x &#8211; lookAtMe.x) * .009;<br />
			lookAtMe.y += (mouse3D.y &#8211; lookAtMe.y) * .009;</p>
<p>			plane.copyTransform(mouse3D);</p>
<p>			super.onRenderTick(event);<br />
}<br />
}<br />
}</p>
<p>please let me know i have done wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mozzy</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-7311</link>
		<dc:creator>Mozzy</dc:creator>
		<pubDate>Sun, 06 Sep 2009 05:50:06 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-7311</guid>
		<description>hi there,
I have been trying to use this example in Flex but still didn&#039;t really figure out how.

Do you have some examples for flex?</description>
		<content:encoded><![CDATA[<p>hi there,<br />
I have been trying to use this example in Flex but still didn&#8217;t really figure out how.</p>
<p>Do you have some examples for flex?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vinnie vivace</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-1040</link>
		<dc:creator>vinnie vivace</dc:creator>
		<pubDate>Mon, 16 Mar 2009 09:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-1040</guid>
		<description>Hi. Brand new to Papervision, and 3D in general, so please excuse ignorance. Im wanting to do something similar to this example, but rather, walk around the outside of a sphere, i.e. walk around the outside of a small planet. Is that acheivable?</description>
		<content:encoded><![CDATA[<p>Hi. Brand new to Papervision, and 3D in general, so please excuse ignorance. Im wanting to do something similar to this example, but rather, walk around the outside of a sphere, i.e. walk around the outside of a small planet. Is that acheivable?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sacen</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-429</link>
		<dc:creator>sacen</dc:creator>
		<pubDate>Fri, 16 Jan 2009 03:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-429</guid>
		<description>Hi, Nice effect. Just wounding how you add images so it looks like the shark on http://osflash.org/papervision3d ? Planing to make a website out of this.Any advice will be great.

Many thanks
Sacen</description>
		<content:encoded><![CDATA[<p>Hi, Nice effect. Just wounding how you add images so it looks like the shark on <a href="http://osflash.org/papervision3d" rel="nofollow">http://osflash.org/papervision3d</a> ? Planing to make a website out of this.Any advice will be great.</p>
<p>Many thanks<br />
Sacen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sacen</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-428</link>
		<dc:creator>sacen</dc:creator>
		<pubDate>Fri, 16 Jan 2009 03:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-428</guid>
		<description>planing to make a website out of this 

Thanks
Sacen</description>
		<content:encoded><![CDATA[<p>planing to make a website out of this </p>
<p>Thanks<br />
Sacen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malte</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-412</link>
		<dc:creator>malte</dc:creator>
		<pubDate>Tue, 13 Jan 2009 21:37:13 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-412</guid>
		<description>any idea how to avoid these effects? i really like the mouse3d approach you used in this example and it would be nice to look around the whole sphere.
thanks in advance.</description>
		<content:encoded><![CDATA[<p>any idea how to avoid these effects? i really like the mouse3d approach you used in this example and it would be nice to look around the whole sphere.<br />
thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Lindquist</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-411</link>
		<dc:creator>John Lindquist</dc:creator>
		<pubDate>Tue, 13 Jan 2009 21:32:39 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-411</guid>
		<description>it&#039;s the same as the problem I was explained. The axis gets screwy if you just look around everywhere.</description>
		<content:encoded><![CDATA[<p>it&#8217;s the same as the problem I was explained. The axis gets screwy if you just look around everywhere.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malte</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-410</link>
		<dc:creator>malte</dc:creator>
		<pubDate>Tue, 13 Jan 2009 21:27:49 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-410</guid>
		<description>thanks alot. it works(without upside down) but there is a flip when reaching some point then its normal again. not sure why...</description>
		<content:encoded><![CDATA[<p>thanks alot. it works(without upside down) but there is a flip when reaching some point then its normal again. not sure why&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Lindquist</title>
		<link>http://pv3d.org/2009/01/05/looking-around-the-inside-of-a-sphere/comment-page-1/#comment-409</link>
		<dc:creator>John Lindquist</dc:creator>
		<pubDate>Tue, 13 Jan 2009 20:50:09 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=304#comment-409</guid>
		<description>you can add another line like:

&lt;pre lang=&quot;java&quot;&gt;lookAtMe.z += (mouse3D.z - lookAtMe.z) * .03;&lt;/pre&gt;

But you&#039;ll have to manage/limit the movement yourself since the axis of the camera will get all screwy. For example, imagine you want to look at something behind you. And instead of turning around like a normal human would, you do a back-bend so you now see everything upside-down. Then something is in front of you, so you turn around normally, but everything is still upside-down. A whole bunch of those types of problems creep in when you just let the camera follow the mouse. So if you just use that line above, expect weird stuff to happen ;)</description>
		<content:encoded><![CDATA[<p>you can add another line like:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">lookAtMe.<span style="color: #006633;">z</span> <span style="color: #339933;">+=</span> <span style="color: #009900;">&#40;</span>mouse3D.<span style="color: #006633;">z</span> <span style="color: #339933;">-</span> lookAtMe.<span style="color: #006633;">z</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> .03<span style="color: #339933;">;</span></pre></div></div>

<p>But you&#8217;ll have to manage/limit the movement yourself since the axis of the camera will get all screwy. For example, imagine you want to look at something behind you. And instead of turning around like a normal human would, you do a back-bend so you now see everything upside-down. Then something is in front of you, so you turn around normally, but everything is still upside-down. A whole bunch of those types of problems creep in when you just let the camera follow the mouse. So if you just use that line above, expect weird stuff to happen <img src='http://pv3d.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
