generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Wind

Previous Thread :: Next Thread 
caca50 is not online. 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 is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
17 Jul 2017 10:04 PM
bodyvelocity


Report Abuse
caca50 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
18 Jul 2017 03:50 PM
tagged parts arent important


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image