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: Check if a brick is facing up or not

Previous Thread :: Next Thread 
PuzzleCrazy is not online. PuzzleCrazy
Joined: 01 Feb 2010
Total Posts: 1245
29 Dec 2013 09:23 PM
I am trying to check if a brick is facing up or not. I've tried using CFrame.Angles but have not succeeded. By "up" I mean if it's topsurface is facing up.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Dec 2013 09:25 PM
the top surface or front surface?

You could just check the rotation property, as an easy way.
Or using asin
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
29 Dec 2013 09:26 PM
Rotation Property.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
29 Dec 2013 09:27 PM
Dat ninja D:
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
29 Dec 2013 09:29 PM
I think he's trying to make a stabilizer maybe?
Report Abuse
PuzzleCrazy is not online. PuzzleCrazy
Joined: 01 Feb 2010
Total Posts: 1245
29 Dec 2013 11:00 PM
Sorry, I'm having a lot of trouble with this. I know how to check the rotation property, but I have a large number of bricks that I'm trying to change. I want to make sure each and every one of them face up, and as I individually look at each of them their rotations vary.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Dec 2013 11:03 PM
Just check the rotation on the X and Z axes
Report Abuse
PuzzleCrazy is not online. PuzzleCrazy
Joined: 01 Feb 2010
Total Posts: 1245
30 Dec 2013 10:45 AM
Thank you, that worked. I have another problem. I change the X and Z axes to 0 to get the top to face up, but then previous rotations are eliminated; as if the brick goes back to the grid. Rotation that I want to change changes correctly, but then, I don't know how to explain it, the fromEulerAnglesXYZ(_,This_Rotation,_) is set back to the grid, although I want the brick to stay rotated that way. How do I fix this?
Report Abuse
Milkilla is not online. Milkilla
Joined: 01 Sep 2011
Total Posts: 379
30 Dec 2013 10:46 AM
change the surface to weld
Report Abuse
PuzzleCrazy is not online. PuzzleCrazy
Joined: 01 Feb 2010
Total Posts: 1245
30 Dec 2013 11:14 AM
This has nothing to do with welding; all of the bricks are anchored, and this is done through the command bar.
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
30 Dec 2013 11:16 AM
I think it would have something to do with CFrame.lookVector
Report Abuse
StBashkir is not online. StBashkir
Joined: 29 Aug 2008
Total Posts: 26171
30 Dec 2013 11:30 AM
I believe what is happening is an internal attempt at fixing Gimbal Lock, which occurs when using Euler's angles. Google Gimbal Lock
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