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
 

How to use BodyGyro?

Previous Thread :: Next Thread 
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
01 Aug 2016 08:34 AM
Well, i need to make the part to spin freely in Y axis, but so it is locked in other axis.
I tried to set the BodyGyro's CFrame like this:
script.Parent.CFrame = CFrame.new(0,0,0)*CFrame.Angles(0,0,math.pi/-2)

so it is stationed in 0,x,-90. (x is free rotation). Yet it doesnt fix the part's rotation, but acts like it was BodyAngularVelocity. Any way of fixing this?


Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
01 Aug 2016 10:35 AM
Help?


Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
01 Aug 2016 11:02 AM
Please?


Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
01 Aug 2016 12:53 PM
bump 1


Report Abuse
ISHOOTPPL is not online. ISHOOTPPL
Joined: 06 Dec 2014
Total Posts: 109
01 Aug 2016 01:02 PM
I'm not sure bout body gyro. I've used it before but never really understood it.
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
01 Aug 2016 01:19 PM
BodyGryo affects the orientation of the part, not just the position on a couple axis.

"The target orientation of the object. Only the rotational component is used - the translational component, CFrame.p, is ignored."

So just substituting zeroes doesn't tell it to ignore the orientation on that axis, it just points it to (0,0,0) XD or whatever

You want to use BodyAngularVelocity


Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
02 Aug 2016 02:02 PM
No, i want it to have fixed rotation in x and z axis, but so the y axis is free to move.


Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
03 Aug 2016 04:30 AM
Still in need of help.


Report Abuse
2eggnog is not online. 2eggnog
Joined: 08 Nov 2008
Total Posts: 1351
03 Aug 2016 04:37 AM
Set the BodyGyro's MaxTorque to Vector3.new(math.huge, 0, math.huge)


Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
03 Aug 2016 04:46 AM
... No

Set the MaxTorque to Vector3.new(0,mah.huge,0)
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
03 Aug 2016 04:46 AM
it will glitch out and destroy itself into nowhere if i do that


Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
03 Aug 2016 04:46 AM
Vector3.new(0,math.huge,0)

*math, not mah
Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
03 Aug 2016 04:48 AM
It shouldn't, maybe check your other properties if it's doing that. Depending on how big your part is you shouldn't need that much force applied
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
03 Aug 2016 04:49 AM
But wouldnt it mean that it could move freely in x and z axis (which i dont want to)?


Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
03 Aug 2016 04:51 AM
If you set the MaxTorque to Vector3.new(0,math.huge,0) then no, torque will only be applied to the Y axis, effectively 'locking' the part on the x and z
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
03 Aug 2016 04:53 AM
Nope, it glitched out and destroyed itself


Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
03 Aug 2016 04:56 AM
1) How big is the part that you're rotating

2) what's your P value set to in the BodyGyro
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
03 Aug 2016 05:03 AM
I will give you a model of it, cuz i gotta go now.


Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
03 Aug 2016 05:04 AM
https://www.roblox.com/item.aspx?id=471354454


Report Abuse
Niveum is not online. Niveum
Joined: 15 Aug 2009
Total Posts: 3437
03 Aug 2016 05:07 AM
Virtual economy is offline right now and I'm on mobile so maybe tomorrow :\
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