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
 

How do I set the rotation of a model?

Previous Thread :: Next Thread 
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
27 Jun 2014 02:43 AM
How do I make a model face a certain direction, such as up for 5 seconds, then down?
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
27 Jun 2014 02:45 AM
A model can not have a direction.
Thus, your question is impossible.
You would have to precise what is "the front of your model"
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
27 Jun 2014 02:52 AM
Have you ever played Reason 2 die? I'm referring to that. He somehow manages to make some of his vehicles face down when approaching, then face up when leaving. The wiki says something about "SetIdentityOrientation()". It says stuff about being able to set the rotation of a model, but nothing's in the arguments, and it doesn't show how to even use it.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
27 Jun 2014 02:55 AM
Well, there is a nifty little bypass called SetPrimaryPartCFrame.

If you take a the PrimaryPart from your model, put it into workspace, then put it somewhere.. Don't forget to rotate it. You can then set the models CFrame using that. While setting the CFrame, the model will rotate accordingly to the rotation of the part in workspace.
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
27 Jun 2014 02:55 AM
*if you take the PrimaryPart
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
27 Jun 2014 02:57 AM
SetIdentityOrientation() is used to rotate a model to what it was when you use the method; It's not what you want to do. You still need to tell us what is "the front" of your models.

I don't play games so I wouldn't know about reason 2 die, but since you talked about vehicules, he most probably doesn't use CFrame, or else the vehicules would look clunky.

Try to use BodyGyro and other body movers.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
27 Jun 2014 03:28 AM
I tried using SetPirmaryPartCFrame and it automatically CFrames the entire model to a certain location rather than changing it;s rotation
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
27 Jun 2014 03:31 AM
Did you look at Body Gyro?

If you didn't you should. Making your car move using CFrame would be very complex as you would need to make some collision detection algorith.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
27 Jun 2014 03:56 AM
Yep. I used body gyro and it's flawless. If you want to see what I was doing with my model, it's here:

http://www.roblox.com/Lua-Practice-place?id=162991016
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