|
| 01 Oct 2014 05:23 PM |
I'm making a matrix gun, that allows you to slow down every bullet in the game for a limited time.
I know I have to lower the velocity, but how do I lower the velocity of something if the velocity changes so often? i can't change anything as random as this
486.984772, 54.447525, 632.361633 346.83374, -217.554779, 687.296326 620.448181, 141.663666, 484.742645 734.500305, 170.425171, 267.328552 -224.25528, 194.890381, 742.783447 |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Oct 2014 06:02 PM |
| You apply less velocity in the opposite direction. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 06:08 PM |
i can't do that cause the velocitys are so random
the speed i'm trying to make them go at is really slow
so if i took like 600 from 620, then what do i do if the velocity is 500, |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 06:11 PM |
Set the speed to a constant number?
-Vanilla |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 06:14 PM |
can't
if velocity is
734.500305, 170.425171, 267.328552
and i set it to 500,0,0
it'll just go straight in a certain diagonal
|
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 06:14 PM |
in a certain direction*
poker123456789 owes me 40k robux & theraptradingguest scammed vetrius |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 06:16 PM |
Slow down by percentage?
-Vanilla |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 06:18 PM |
so like
if velocity.X > velocity.Z then
X = velocity.X Y = velocity.Y Z = velocity.Z
Velocity = Vector3.new(X/5,Y,Z) |
|
|
| Report Abuse |
|
|
suremark
|
  |
| Joined: 13 Nov 2007 |
| Total Posts: 6315 |
|
|
| 01 Oct 2014 06:24 PM |
| You could offset the gravity with a BodyForce (Y-axis force of 196.2*part:GetMass()) and then manipulate the velocity with a BodyVelocity. You'll get a smooth transition and you can manipulate the maxForce to set the rate at which they slow & speed up. Shouldn't require any math since velocity is in object coordinates (ie, relative to the traveling bullet). |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 06:28 PM |
im very confused lol
i get confused easily |
|
|
| Report Abuse |
|
|
suremark
|
  |
| Joined: 13 Nov 2007 |
| Total Posts: 6315 |
|
|
| 01 Oct 2014 07:22 PM |
Okay, so the problem with slowing the velocity of the bullets is that they only have a short time before gravity pulls them down to the ground. To suspend them in air, you need to negative gravity acceleration by applying a BodyForce upwards on the Y-axis. Since Force = mass * acceleration and ROBLOX gravity is 196.2 studs per second, you're gonna want to multiply mass time gravity to get your force.
The next issue is adjusting the velocity of the bullets. I've not tested manually editing the Velocity property, I would normally assume that multiplying it by 0.01 or so would work fine, so I would disregard my suggestion about BodyVelocity--but if all else fails, you can try using BodyVelocity to adjust it. As per other user's suggestions, a percent multiplier should do the trick. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 07:48 PM |
| Or do the noob way and anchor for a split second and unanchor |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2014 09:30 PM |
| i got it now, everyone here helped greatly, i was really ready to stop cause of something as small as that. now i'm going to make the bullet have transparent rings come from behind it |
|
|
| Report Abuse |
|
|