Results 1 to 2 of 2

Thread: PiloGL -Dragging Object relative to te viewport

  1. #1
    Junior Member
    Join Date
    Mar 2011
    Posts
    1

    PiloGL -Dragging Object relative to te viewport

    Hello everybody!
    This is my first post here.
    I have one Question.
    I'm using PhiloGL (a WebGL Framework) to create a simple "drag & drop" engine of Objects like a Square or triangle.

    My first attempt doesn't work. The Square is following my Mouse, but it's not relative to the cam. In the middle of the viewport it's ok, but the farther im* going (with my mouse) to the edges of my viewport, the farther goes my Square from the Mousekoordinates in the direction of the edge. Do you know what i mean?
    There is an Event for relative Mousekoordinates but i dont know how to use it.

    Here is my code. (Sorry for bad englisch. )

    Code :
    //Create App
      PhiloGL('canvas', {
        program: {
          from: 'ids',
          vs: 'shader-vs',
          fs: 'shader-fs'
        },
     
    	//steuerung dreieck
     
    	    events: {
     
    	 relative (true);
    	  onMouseMove: function(e) {
     
     
    		squareMoveX = e.x;//squareMove Koordinates are the Positioncoordinates of the Square.
    		squareMoveY = e.y;
          }
        },

  2. #2
    Senior Member
    Join Date
    May 2010
    Posts
    207

    Re: PiloGL -Dragging Object relative to te viewport

    You're going to need to find a forum for this "PiloGL" toolkit - there is no way for us to answer it here.

Similar Threads

  1. Strange viewport on Chrome
    By Coolcat in forum OS & Browser specific questions
    Replies: 3
    Last Post: 12-29-2009, 02:13 PM
  2. The events relative to the playback.
    By Jim in forum OpenMAX AL - feedback
    Replies: 1
    Last Post: 06-19-2008, 08:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •