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 » Scripting Helpers
Home Search
 

Re: Is there something wrong with BodyForce?

Previous Thread :: Next Thread 
rulzalot is not online. rulzalot
Joined: 05 Jul 2009
Total Posts: 6305
01 Apr 2012 02:56 AM
It seems like when all three of the X,Y, and Z forces drop below the mass of the object, body force will not push the object. It should though, just slowly.
Report Abuse
Secretiverobocop is not online. Secretiverobocop
Joined: 23 Apr 2011
Total Posts: 510
01 Apr 2012 02:58 AM
Otherwise known as the laws of physics
Report Abuse
rulzalot is not online. rulzalot
Joined: 05 Jul 2009
Total Posts: 6305
01 Apr 2012 02:59 AM
I don't think you understand the laws of physics correctly, secretiverobocop.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
01 Apr 2012 03:38 AM
BodyForce pushes XYZ in relation to the global axis. If you find the gravity number and times it by the mass, you can get an anti-gravity effect of weightlessness.

I don't really understand what you are saying. Can you give an example?
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
01 Apr 2012 03:48 AM
It shouldn't push the object more slowly, it should just make it fall slower...

Well, if we're talking about objects that are falling and pushing them up, that is.

If you're talking about just pushing them in any direction ignoring the gravity, then...

Perhaps there's a bug report to file to ROBLOX right there? :P
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
01 Apr 2012 04:10 AM
*Digs up a really old place I made*

b = Instance.new("BodyForce", object)
b.force = Vector3.new(0, 196.2 * a:GetMass(), 0)

That will make an object weightless.

Box of gravitational fun was a great game...
Report Abuse
rulzalot is not online. rulzalot
Joined: 05 Jul 2009
Total Posts: 6305
01 Apr 2012 12:06 PM
I'm actually working on a system for gravity, I decided to ditch BodyForce because of the problem I ran into though. If you we're curious, I used this to determine the acceleration (with direction) of the object:

Dist = (x.Position-v.Position).Magnitude
Strength = ((x:GetMass()+v:GetMass())/2)*(1/Dist^2)
UnitDirection = (x.Position-v.Position).unit
return UnitDirection*Strength

It only works with x towards v, but 'x' and 'v' can be changed and constantly updated.


By the way, I'm not worried about weightlessness, I already know what to do. What I'm worried about is the minuscule forces not even accelerating the object if they are below the mass. EX: If BodyForce.force = (4,Part:GetMass()*196.2,0) and Part:GetMass() > BodyForce.force.X then it will not push it on it's X axis
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
01 Apr 2012 12:08 PM
You cannot accelerate slowly if the force is not enough to accelerate correctly (in moving at all)

196.22 would give an approximate absolute to the gravity. So to make it go a bit faster in a certain direction, you add more to that. 196.4
Report Abuse
rulzalot is not online. rulzalot
Joined: 05 Jul 2009
Total Posts: 6305
01 Apr 2012 12:23 PM
Ok, yes, but lets ignore gravity. Let's say its no longer a thing and i was just trying to move an object on it's X axis.

So:

BodyForce.force = Vector3.new(x,0,0)

If x is below BodyForce.Parent:GetMass(), then the object will not move out of it's motionless state. Am I doing something wrong? Can someone explain why it doesn't work correctly for me?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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