• Advertisement


This topic is now archived and is closed to further replies.

DirectInput mouse problems & cast

This topic is 5609 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i am trying to CAST the x,y axis of a mouse and have an object follow the mouse movements. i got the objects to rotate now i am trying to move one(sphere1angle) or (sphere2angle)...... does anyone have source material, link, something on how to add the mouse movements........
void ActApp::DrawScene(LPDIRECT3DDEVICE8 device, const D3DVIEWPORT8& viewport)
	sphere1angle += AngleInc;

	float x1 = cos( sphere1angle ) * CircleRadius;
	float z1 = sin( sphere1angle ) * CircleRadius;

	sphereModel.SetLocation( x1, 0.0f, z1 );

         /////////////this is what i added////////////

	DWORD xAxis, yAxis;
	float xModelAxis = (float)xAxis;
	sphereModel.SetLocation( xModelAxis, xModelAxis, 0.0f );
         /////////////this is what i added////////////

	sphere2angle += AngleInc;
	float y2 = cos( sphere2angle ) * CircleRadius;
	float z2 = sin( sphere2angle ) * CircleRadius;

	sphereModel.SetLocation( y2, 0.0f, z2 );
GRR [edited by - GRR on October 16, 2002 6:30:34 AM] [edited by - GRR on October 21, 2002 5:20:09 AM] [edited by - GRR on October 21, 2002 5:20:55 AM]

Share this post

Link to post
Share on other sites

  • Advertisement