playMaker

Author Topic: Projectile speed inconsistent [SOLVED]  (Read 831 times)

TheNecron

  • Playmaker Newbie
  • *
  • Posts: 17
Projectile speed inconsistent [SOLVED]
« on: February 02, 2019, 03:52:46 AM »
Hello, I'm attempting to create a program which launches a projectile from my character to a mouse click location from a 2D top down perspective. I have my mouse pick 2D working properly and my look at 2D functioning properly. However I am having difficulty designing the movement for the projectile. I have done several attempts from set velocity, add force, and translate as a function of my selected mouse point which works to a degree, however I run into the issue that the projectile is slower if the mouse click is closer to the character. If I click far away from my character the projectile moves faster while if I click closer it moves really slowly. I would like it to work at a constant speed regardless of the mouse clicks distance from the character. Does anyone have any suggestions for what I could be doing wrong or any way to adjust my code so that it moves consistently?
« Last Edit: July 19, 2019, 08:12:44 PM by TheNecron »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Projectile speed inconsistent
« Reply #1 on: February 02, 2019, 02:58:09 PM »
Hi,
Can you show your setup.
if you have a rigidbody, maybe you have drag on it.

Also when you tried do you have every frame checked with set velocity?