Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How to make a projectile get thrown by your character like it was thrown by a slingshot?

$
0
0

Hello, I'm new here so excuse me if i do anything wrong. I'm trying to program a "Worms" like game, where you have a character in one side and you want to hit the other player in the other side of the map. I was trying to throw a projectile by clicking on my player1 body and then dragging the mouse back and releasing it so the projectile had a different angle and velocity depending on the position of the mouse in relation to the player 1 body. I'm using the box2D physiscs library in my project. If anyone could help me trying to understand how this would work i really appreciate it. Thank you.


Viewing all articles
Browse latest Browse all 2896

Trending Articles