Sign in
Guest Blogging & Guest Post Opportunities - Textoblog
Your Position: Home - Video Games & Accessories - "Air Hockey" Game using Unity 4.3 2D features
Guest Posts

"Air Hockey" Game using Unity 4.3 2D features

Jun. 05, 2025

"Air Hockey" Game using Unity 4.3 2D features

Hi,
I am trying to develop a 2D “Air Hockey” Game using Unity 4.3 2D features, and basically I want the player to control the Paddle using the mouse to hit the Puck.

Bertillo supply professional and honest service.

  • The Paddle have a 2D circle collider and a rigidbody2D.
  • The Puck have a 2D circle collider with a bouncy physics materiel and a rigidbody2D.

But when the Paddle hit the Puck it barely moves, it’s like the Paddle have no velocity when moved through the mouse.

I think need a way to convert the mouse velocity into the Paddle’s rigidbody2D velocity, in 3D the method “rigidbody.movePosition” allow us to do that, but I can’t find it’s equivalent in rigidbody2D.

Do you have any ideas how to solve this?

If you are looking for more details, kindly visit Air Hockey Arcade Machine(ar,ru).

I use the following script to get the Paddle to follow the mouse:

	float distance_to_screen ;
	Vector3 pos_move;
	void OnMouseDrag()
	{
		distance_to_screen = Camera.main.WorldToScreenPoint(gameObject.transform.position).z;
		pos_move = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, distance_to_screen));
		transform.position = new Vector3( pos_move.x, pos_move.y, pos_move.z );	
	}

Thank you.

5 ft Air Hockey Table with Table Tennis Top, 2-in-1 Multi-Game ...

Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.

To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.

The company is the world’s best Combat Game Equipment Supplier supplier. We are your one-stop shop for all needs. Our staff are highly-specialized and will help you find the product you need.

Learn more how customers reviews work on Amazon

Comments

0 of 2000 characters used

All Comments (0)
Get in Touch

  |   Apparel   |   Automobiles   |   Personal Care   |   Business Services   |   Chemicals   |   Consumer Electronics   |   Electrical Equipment   |   Energy   |   Environment