Hi. Is it possible to use the "move2d" control option but without inverting both axis. I'd like to use a HMD (Head Mounted Display), hence need the 360 to stop rotating when the head stops. But so far turning head to the right let me go to the left...
Any idea?
Question on control "move2d": how to invert rotation?
-
-
Hi,
currently such movement will be only possible via a small flash plugin,
e.g. like here:
Follow Mouse Pluginthere the current mouse position is used as source and then transformed (in any way) to the current viewing position,
e.g. here an example action script source: (for the free Flex SDK mxmlc compiler)
Code
Alles anzeigenpackage { import flash.display.Sprite; import flash.events.Event; import krpano_as3_interface; public class looktomouse extends Sprite { private var krpano : krpano_as3_interface = null; public function looktomouse() { if (stage == null) this.addEventListener(Event.ADDED_TO_STAGE, startplugin); } private function startplugin(evt:Event):void { krpano = krpano_as3_interface.getInstance(); // disable default mouse control krpano.set("control.mousetype", "off"); addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function enterFrameHandler(event:Event):void { var mx:Number = stage.mouseX / stage.stageWidth; var my:Number = stage.mouseY / stage.stageHeight; var ath:Number = (mx - 0.5) * 360.0; var atv:Number = (my - 0.5) * 180.0; krpano.set("view.hlookat", ath); krpano.set("view.vlookat", atv); } } }
here as compiled swf:
looktomouse.zipbest regards,
Klaus -
Thanks Klaus, will look into the action scripting side to fit my exact needs.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!