mouse pointer

(8 posts) (4 voices)

Tags:

  1. Jeeva3m

    veteran
    Joined: Apr '14
    Posts: 131

    hi,
    I know how to get x,y value from mouse pointer so using these value i can move a 2D Object. But in my project i want to move a 3D Object based on the dragging speed. I dont know how to do please help me with an example.
    awaiting for your reply.....

    Posted 1 year ago #
  2. hiddentux

    3D Experience Guru
    Joined: Feb '09
    Posts: 400

    Hi,

    This topic may help you : http://www.3dvia.com/forums/topic/need-help#post-67127

    Posted 1 year ago #
  3. Jeeva3m

    veteran
    Joined: Apr '14
    Posts: 131

    Hi hiddentux thanks for your reply. I am not expecting this drag and drop concept In the physics world 3D Object has to move as for the mouse speed movement...

    For more clarification, please have a look at the image. You can understand my need.

    Attachments

    1. new.jpg (98.2 KB, 13 downloads) 1 year old
    WARNING: Files uploaded in the forums are not monitored by 3DVIA and therefore might contain content that is malicious or offensive. Download at your own risk
    Posted 1 year ago #
  4. iainB85

    Interplanetary Delivery Boy
    Joined: Jun '08
    Posts: 515

    I created a quick sample... you obviously need to more graphical cues / restrictions in place for the full angry birds effect but in the sample click and drag to the left... the farther you drag to the left, the further the ball will fly forward. I commented the code inside, let me know if this helps.

    Attachments

    1. forumAngryBirds.mpexp (57.4 KB, 16 downloads) 1 year old
    WARNING: Files uploaded in the forums are not monitored by 3DVIA and therefore might contain content that is malicious or offensive. Download at your own risk
    Posted 1 year ago #
  5. Jeeva3m

    veteran
    Joined: Apr '14
    Posts: 131

    Hi iainB...thanks for the sample...helped me in my project...
    have you done something for angle?...
    in the sample... it goes based on the speed of mouse-click-drag..
    along with this, can we do it according to the angle as i drag using mouse?

    jeeva

    Posted 1 year ago #
  6. iainB85

    Interplanetary Delivery Boy
    Joined: Jun '08
    Posts: 515

    Angles / orientation can be tricky a 3D enviornment. You certainly could use this to affect the tradjectory of the ball, but a simpler solution might simply be to use the Y coordinates of the mouse (how high or low is the mouse on screen in relation to ball) then come up with a calculation to use that as Y velocity on the ball.

    Would that fit your needs?

    Posted 1 year ago #
  7. Jeeva3m

    veteran
    Joined: Apr '14
    Posts: 131

    yeah iainB...i got some idea. Let me try with the coordinates as you said.

    thanks again
    jeeva

    Posted 1 year ago #
  8. kmilam

    new member
    Joined: Apr '14
    Posts: 1

    hi,
    I can´t open the .mpexp because i have an older version,
    could you help me please?

    Posted 3 weeks ago #

Reply

You must log in to post.