|
| 31 Oct 2012 12:45 PM |
Hey, can anyone explain or link me to a webpage explaining BodyVelocity and BodyGyro?
If you can, much appriciated. |
|
|
| Report Abuse |
|
|
| |
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 31 Oct 2012 12:50 PM |
BodyVelocity is a force applied to a world axis, BodyGyro is the rotation of an object.
E.G:
local BV = Instance.new("BodyVelocity",game.Workspace.Riderj.Torso) BV.maxForce = Vector3.new(0,32000,0) BV.velocity = Vector3.new(0,200,0)
This will constantly put a 'push' of 200 on the Y axis. The max force needs to be set to battle the gravity in game. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 31 Oct 2012 12:53 PM |
| To clarify that great explaination a bit, it will get a "Push" to attempt to set its velocity to 200, once achieved or exeeded the BodyVelocity will "Pull" so that the object slows down to 200. |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2012 12:53 PM |
| What does it push? Up, or down? |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2012 12:54 PM |
Oh. Okay...
So... Gyro? I'm not sure on that.. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 31 Oct 2012 12:56 PM |
Gyro has a max torque it can use and it attempt to turn the brick to the angle that is set to it, Gyro.cframe = SetAngleHere. The Body Velocity pushes and pulls on the axis you set it to if I set the velocity to 0,1,1 it will travel up at one stud per second and right at one stud per second, BUT only if it has enough max force to do so. |
|
|
| Report Abuse |
|
|
|
| 31 Oct 2012 01:11 PM |
One last thing, if you will.
An example of use? |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 31 Oct 2012 01:15 PM |
A scripted car might use one like this while wait() do speed = speed + script.Parent.Throttle script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*Speed*script.Parent.Throttle end |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 31 Oct 2012 01:16 PM |
And for a gyro, script.Parent.Parent.Turning.Gyro.cframe = script.Parent.CFrame.lookVector Make it look where the script.Parent is looking, or atleast turning it the same direction. |
|
|
| Report Abuse |
|
|
HaxHelper
|
  |
| Joined: 19 Dec 2009 |
| Total Posts: 1208 |
|
|
| 31 Oct 2012 01:17 PM |
Actually, an elevator uses both of these concepts.
A BodyGyro to keep it level, and a BodyPosition (like BodyVelocity, except with a set position) to move it. |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 31 Oct 2012 01:20 PM |
| Well so can a scripted car, I just chose not to use both in that way because it would be more complex than it needed to be. |
|
|
| Report Abuse |
|
|