- Home /
Question by
siddharth3322 · Nov 01, 2019 at 03:22 PM ·
collidertriggerrigidbody2dphysics2djoints
Drag Player Object using Physics 2D
I want to drag player object to throw coming obstacles in the way. For this purpose, I require to hold the player object and using it, I require to hit upcoming obstacles in the gameplay.
Basically currently I am working on this type of gameplay:
Rise Up Game - Level 40+ 7851 High Score!!!
At present I am trying to hit obstacles using this setup:
void Update()
{
Vector2 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Rigidbody2D.position = mousePos;
}
Here are the inspector settings:
Still, the player hitting is jerky or not smooth. Multiple times obstacles get fixed within player object.
So how to make this hitting proper?
player-crosshair-inspector.png
(135.7 kB)
Comment