Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9008037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:50:52+00:00 2026-06-16T01:50:52+00:00

I recently created this tennis game using my own basic physics: http://martywallace.com/sandbox/tennis/ Basically a

  • 0

I recently created this tennis game using my own basic physics: http://martywallace.com/sandbox/tennis/

enter image description here

Basically a tennis racquet sticks to your mouse and you can hit the tennis balls upward.

The physics aren’t that great, and I want to make a more interesting version of this game with milestones and levels in Flash. I am planning to use Box2D because I have moderate experience with it.

I’m not sure how to go about creating the racquet – as far as I understand Box2D, the racquet needs a velocity to influence the velocities of the balls when you hit them (so that you can hit them harder or softer upward to keep them up). With that said, I’m assuming I can’t just have a kinematic body that will have its position set to the mouse, because it won’t affect the velocities of the balls as expected.

I’ve also thought about setting the velocity to the difference between the racquet position and the mouse each frame, but I am concerned that won’t provide accurate positioning and am also thinking that the velocity could end up really large if you move the mouse quickly.

What is the correct way to have a physics object locked to the mouse but also to have its displacement in the last frame (from where it was to the mouse) affect the balls?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:50:53+00:00Added an answer on June 16, 2026 at 1:50 am

    If you try the method you mentioned about setting the velocity of a kinematic body, I think you’ll find it works fine. You would want to set the velocity so that the raquet moves to the correct position in one time step.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently created a webpage, while using an usbWebserver, so basically a local server.
I recently created a flextable using GWT 2.4 using this code: @uiBinder Flextable flextable;
I recently created a ListView using ListAdapter and applied a static background image behind
I recently created a Sinatra app with a login form (no basic auth). To
I'm helping a friend learn Haskell and he recently created code like this, which
I want to select recently created element doing something like this: $(body).append(<div id='popup.dialog'></div>); dialogDiv
I have recently created a new rails 3 application, using the code that I
I have recently created an Asteroids game/app for one of my CS classes with
Introduction I've recently created an few application within the same solution using the NServiceBus
I recently created a Windows application project using C#. I have completed all the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.