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

Re: Conflicts between BodyAngularVelocity and BodyGyro?

Previous Thread :: Next Thread 
Organism is not online. Organism
Joined: 02 Mar 2009
Total Posts: 19
10 Mar 2014 10:11 PM
Alright, I'm currently trying to get a brick to rotate on its own. I have a BodyPosition to hold it in place, BodyGyro to stabilize it when players step on it, and BodyAngularVelocity to actually rotate.

It works fine when I set it to rotate around the y axis; that is, when angular velocity is (0, 1, 0) and BodyGyro's max torque is (100, 0, 100).
When I try to get it to rotate around any other axis, it doesn't work. For example, if I wanted it to rotate around the x axis I try setting angular velocity to (1, 0, 0) and BodyGyro's max torque to (0, 100, 100). It won't rotate at all in this case; the only way I can get it to rotate is by setting BodyGyro's max torque to (0, 100, 0), but that doesn't stabilize the brick. Same with the z axis.

What am I doing wrong?
Report Abuse
Organism is not online. Organism
Joined: 02 Mar 2009
Total Posts: 19
10 Mar 2014 11:38 PM
I've done some research, and it may have something to do with BodyGyro's cframe. If this is the case, how would I fix it?
Report Abuse
tahu157 is not online. tahu157
Joined: 16 Nov 2008
Total Posts: 15045
10 Mar 2014 11:39 PM
BodyGyro doesn't just keep the brick level, it keeps it from rotating as well.

If you anchor the part, rotate it using the Studio's built-in rotate tool, and then unachor it, it should rotate itself back to the same orientation it was in before you rotated it. It's like a compass in that it is meant to keep your part facing a certain direction.

So, you're not doing anything wrong per se, it's just that BodyGyro is meant to keep the part from moving in the way you want it to move.


I honestly haven't done too much work with BodyGyro though, so I don't know of any workarounds off the top if my head.
Report Abuse
tahu157 is not online. tahu157
Joined: 16 Nov 2008
Total Posts: 15045
10 Mar 2014 11:46 PM
Okay, so yeah, you could probably use the BodyGyro's CFrame. You probably won't need your BodyAngularVelocity.

It'll probably take some moderate scripting and trial and error though.

You'll need a script that changes the lookvector:

http://wiki.roblox.com/index.php?title=CFrame#Properties

of the CFrame every so often. However long it takes for the part to rotate towards each lookvector.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Building 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