I want to create a projectile system with specific elements that I can also use for different weapons in my game. It’s primarily for a bomb in my game, but I figured that how the system works can also work for superballs, and maybe even slingshots or paintball guns if I make it so the projectiles aren’t affected by gravity and don’t arc. I’m not asking anyone to make any scripts for me, but I’m not exactly sure where to start with this or what I should be using in the first place to help me achieve this.
What I want:
An arc that dictates the path of the projectile, ranging from the player to the player’s mouse position.
The angle of the arc to be tweakable.
The arc will be visible to players and each section will be separated by individual lines instead of just one long line.
When the mouse is released, the projectile is released.
When released, the projectile follows the path of the arc, though this will be physics-based rather than through tweens or similar methods.
And that’s pretty much it.
But I’m stumped on how I should
Make a physics-based system that dictates where the projectile will go along with the arc.
Make a visual arc that follows the range of the arc that the projectile will go in.
math.sqrt gets the square root of the number, so it’s the square root of the distance x gravity (of the workspace), then you times it by the unit of the direction to get the velocity for the projectile then you set it
Well, I understand that but I’m asking how this formula translates to an arc and how doing things such as multiplying the distance and gravity, using sqrt on that, and adding the direction to an offset makes the velocity work.
I don’t know if I’m missing something, but I know I should’ve probably clarified that.