Issue Applying Force To Ball

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I am making a dodgeball game. Right now, I’m implementing a throw system. The user holds their m1, before releasing. (not implemented yet, rn is a basic click). The ball needs to go where the character is facing, and as high as the camera is facing.

  1. What is the issue? Include screenshots / videos if possible!

I can’t find a good way to put force on the ball. I’ve tried using assembly linear velocity, but it doesn’t deaccelerate and multiplying it in a loop ruins gravity. I’ve tried apply impulse but after the impulse is done, the ball still rolls. I tried multiplying the assembly angular velocity but it makes it so low shots that go straight are way weaker than high shots. I need a system where I can control the speed and both distance of the ball, and apply realistic gravity. For apply impulse, if I change the density of the ball to make it go further or faster, well of course it does both. I can’t make the speed/distance ratio different. I want the throw to be able to barely go full court, but if I do so I must make the throw weak.

  1. What solutions have you tried so far? Did you look for solutions on the Creator Hub?

Adding a for loop that changes assembly velocity periodically, but doesn’t stop ball from rolling and looks unrealistic. Also tried linear velocity but its unrealistic and uncontrollable and same thing for apply impulse.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

-- This is an example Lua code block

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

If you’re interested i can gut out a piece of my grenade throwing system (not the best) to experiment with it.
Are you familiar with modules, etc?

1 Like

Somewhat, I’m pretty sure they’re used for storing stuff in tables/calling functions on scripts? I can easily add a system where you throw a ball and aim it with your camera. But every method I use has a fault.

Try out the FastCast module for projectiles, I think it could work with dodgeballs if implemented correctly.

You can also take a look at this, I remember using this to create something similar to a dodgeball.

thank you! ill look into it 30charrssss

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.