<?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: Dragging mouse for camera orbit</title>
	<atom:link href="http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/feed/" rel="self" type="application/rss+xml" />
	<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/</link>
	<description>Papervision3D, ActionScript, and Flex examples and tutorials by John Lindquist</description>
	<lastBuildDate>Thu, 11 Mar 2010 02:38:58 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Soapstar</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-18080</link>
		<dc:creator>Soapstar</dc:creator>
		<pubDate>Wed, 10 Feb 2010 18:30:40 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-18080</guid>
		<description>Hey, is there anyway to use this on a .dae model? Ive tried to integrate a dae model but nothing happens! Im sure its something to do with the &#039; cameraTarget:DisplayObject3D = DisplayObject3D.ZERO; &#039; ? Should this be different for a dae model?&lt;br&gt;&lt;br&gt;thanks</description>
		<content:encoded><![CDATA[<p>Hey, is there anyway to use this on a .dae model? Ive tried to integrate a dae model but nothing happens! Im sure its something to do with the &#39; cameraTarget:DisplayObject3D = DisplayObject3D.ZERO; &#39; ? Should this be different for a dae model?</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NuttyMonk</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-13109</link>
		<dc:creator>NuttyMonk</dc:creator>
		<pubDate>Mon, 23 Nov 2009 14:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-13109</guid>
		<description>Thanks for the tutorial and code examples John.

i have a couple of suggestions to changes in this code which makes the camera orbit feel more natural and also gives the user the ability to look at the bottom of the objects.

change these 3 lines of code in the onMouseMove event function...

cameraPitch += differenceY;
cameraYaw += differenceX;

cameraPitch = cameraPitch &lt; 90 ? cameraPitch : 89.9999;

...to this...

cameraPitch -= differenceY;
cameraYaw -= differenceX;

cameraPitch = cameraPitch &lt; 180 ? cameraPitch : 179.9999;

Hope that helps someone.

Cheers

NM</description>
		<content:encoded><![CDATA[<p>Thanks for the tutorial and code examples John.</p>
<p>i have a couple of suggestions to changes in this code which makes the camera orbit feel more natural and also gives the user the ability to look at the bottom of the objects.</p>
<p>change these 3 lines of code in the onMouseMove event function&#8230;</p>
<p>cameraPitch += differenceY;<br />
cameraYaw += differenceX;</p>
<p>cameraPitch = cameraPitch &lt; 90 ? cameraPitch : 89.9999;</p>
<p>&#8230;to this&#8230;</p>
<p>cameraPitch -= differenceY;<br />
cameraYaw -= differenceX;</p>
<p>cameraPitch = cameraPitch &lt; 180 ? cameraPitch : 179.9999;</p>
<p>Hope that helps someone.</p>
<p>Cheers</p>
<p>NM</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marco</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-4814</link>
		<dc:creator>marco</dc:creator>
		<pubDate>Fri, 14 Aug 2009 08:17:59 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-4814</guid>
		<description>if you use a camera.moveRight(5); somewhere, and then rotate ....the movement done by camera.moveRight is resetted.</description>
		<content:encoded><![CDATA[<p>if you use a camera.moveRight(5); somewhere, and then rotate &#8230;.the movement done by camera.moveRight is resetted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wonky rat</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-4613</link>
		<dc:creator>wonky rat</dc:creator>
		<pubDate>Wed, 12 Aug 2009 10:35:30 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-4613</guid>
		<description>Hi how would you add an easeOut tween on the camera orbit when the mouse is released... I&#039;ve tried this but just end up making the object zoom in and out instead of keeping it going round the direction it was going... :S</description>
		<content:encoded><![CDATA[<p>Hi how would you add an easeOut tween on the camera orbit when the mouse is released&#8230; I&#8217;ve tried this but just end up making the object zoom in and out instead of keeping it going round the direction it was going&#8230; :S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-2309</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Fri, 19 Jun 2009 10:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-2309</guid>
		<description>Great post! Many thanks. Your &quot;oribiting&quot; solution was very helpful! :p</description>
		<content:encoded><![CDATA[<p>Great post! Many thanks. Your &#8220;oribiting&#8221; solution was very helpful! :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lilly</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-1103</link>
		<dc:creator>lilly</dc:creator>
		<pubDate>Fri, 20 Mar 2009 14:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-1103</guid>
		<description>when i try to load this as. file into a .fla-file 

import flash.display.Loader;

	var loadSWF:Loader = new Loader();
	loadSWF.x = 100;
	loadSWF.y = 100;
	
	loadSWF.load(new URLRequest(&quot;test.swf&quot;));
	addChild(loadSWF);


i get this error message:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at papervisionclass()


i debugged it and it throws the error here:

stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);


any idea how to fix it?</description>
		<content:encoded><![CDATA[<p>when i try to load this as. file into a .fla-file </p>
<p>import flash.display.Loader;</p>
<p>	var loadSWF:Loader = new Loader();<br />
	loadSWF.x = 100;<br />
	loadSWF.y = 100;</p>
<p>	loadSWF.load(new URLRequest(&#8221;test.swf&#8221;));<br />
	addChild(loadSWF);</p>
<p>i get this error message:</p>
<p>TypeError: Error #1009: Cannot access a property or method of a null object reference.<br />
at papervisionclass()</p>
<p>i debugged it and it throws the error here:</p>
<p>stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);</p>
<p>any idea how to fix it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lilly</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-1065</link>
		<dc:creator>lilly</dc:creator>
		<pubDate>Wed, 18 Mar 2009 08:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-1065</guid>
		<description>is there a way to fully orbit around the object, in every direction?</description>
		<content:encoded><![CDATA[<p>is there a way to fully orbit around the object, in every direction?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mattyluv</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-1064</link>
		<dc:creator>Mattyluv</dc:creator>
		<pubDate>Wed, 18 Mar 2009 05:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-1064</guid>
		<description>this is awesome, any clues how to add simple throw physics to to the target object?</description>
		<content:encoded><![CDATA[<p>this is awesome, any clues how to add simple throw physics to to the target object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-693</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Thu, 19 Feb 2009 08:19:58 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-693</guid>
		<description>following on the above, i attached two events to the stage (Mouse over and out). 
Now when the Mouse is Over an interactive material,the correct 3D Object event is triggered, but at the same time the stage OUT event is triggered altho the mouse never leaved the stage!</description>
		<content:encoded><![CDATA[<p>following on the above, i attached two events to the stage (Mouse over and out).<br />
Now when the Mouse is Over an interactive material,the correct 3D Object event is triggered, but at the same time the stage OUT event is triggered altho the mouse never leaved the stage!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://pv3d.org/2008/11/19/dragging-mouse-for-camera-orbit/comment-page-1/#comment-692</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Thu, 19 Feb 2009 08:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://pv3d.org/?p=37#comment-692</guid>
		<description>Ok I was messing around with this and found some issues. If the spheres have interactive materials and the viewport is set to interactive. there will be a lot of snapping! for some reason sometimes when the mouse is over an object and we have an event listener the differenceX and differenceY become very large (&gt;200) :/</description>
		<content:encoded><![CDATA[<p>Ok I was messing around with this and found some issues. If the spheres have interactive materials and the viewport is set to interactive. there will be a lot of snapping! for some reason sometimes when the mouse is over an object and we have an event listener the differenceX and differenceY become very large (&gt;200) :/</p>
]]></content:encoded>
	</item>
</channel>
</rss>
