LWJGL Forum

Programming => General Java Game Development => Topic started by: moschops on May 14, 2013, 15:07:07

Title: Rotate Line to mouse
Post by: moschops on May 14, 2013, 15:07:07
Hello everyone, I am in the process of building 3D carrom game, so far everything has gone pretty smoothly, I have designed the board models in blender and have them imported and currently using bullet physics to handle the collisions.

The issue I am having is the mouse input, I am trying to add a directional path so the player will know what direction the piece will move, the picture bellow sort of shows how it currently looks.

(http://i.imgur.com/o73JXOCs.png) (http://imgur.com/o73JXOC)

What I am trying to achieve is to use the mouse's Y axis to rotate the line around the piece and the mouse's X axis to increase the length of the line.

Any help in the best way to achieve this would we awesome, Many Thanks.
Title: Re: Rotate Line to mouse
Post by: Fool Running on May 15, 2013, 12:28:53
Can you not just get the mouse movement changes and add/subtract the values from your rotation and length?