caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 17 Jul 2017 10:02 PM |
Deriving off my previous post, I am not quite getting the wind thing right.
Currently I have where every second, it applies a vector force with a magnitude between 0 and 2, (depending on what the wind force is) but that starts to add up.
If a object is moving 0 vel in the X direction, and the wind is adding 1 vel every second to the X direction, that starts to add up.
If you were to blow on a piece of paper, it doesn't steadily get faster, and I would like to imitate that.
Code:
part.Velocity = part.Velocity+Force
How could I add a constant force for the wind?
Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
| |
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 17 Jul 2017 10:07 PM |
Ahh yes thank you, I forget about those sorts of things. Although body movers don't account for other forces (such as gravity)
I guess I could implement that
Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 17 Jul 2017 10:10 PM |
you could use bodyforce to mess with the gravity, like this:
bodyforce.Force = Vector3.new(0,(workspace.Gravity),0)*object:GetMass()
that line will completely null the effect of gravity, making it float in the air. you can add and subtract values to the workspace.Gravity part of the vector3 to customize your effect of gravity and get it to how you want it to be
|
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 18 Jul 2017 10:49 AM |
| Ok, so I have a BodyVelocity with a velocity of random(-2,2) for x and z, and 0 for y. Then # ################# # ######### with -workspace.Gravity*Mass for y. However, a 1x1x1 part does not go down, and I believe that is because the BodyVelocity is limiting it. I tried replacing the BodyVelocity with a BodyForce, but that amounted to the same affect I had the first time (where it steadily goes faster) Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 18 Jul 2017 10:50 AM |
The censored part says 'i have a bodyforce'
Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil) |
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 18 Jul 2017 03:50 PM |
| i might be wrong, but if you have negative gravity, wouldnt that be the opposite effect of gravity, making the part go up? if you want the part to still go down, but not as fast, you can do so by doing something like this on the bodyforce: ######## = Vector3.new(0,(workspace.Gravity-50),0)*obj:GetMass() |
|
|
| Report Abuse |
|
|
vastqud
|
  |
| Joined: 10 Sep 2011 |
| Total Posts: 2464 |
|
|
| 18 Jul 2017 03:50 PM |
tagged parts arent important
|
|
|
| Report Abuse |
|
|