|
| 23 Aug 2017 10:45 PM |
I was making a door then got stumped, because i have no idea how to set the point of rotation so that i can use cframe to smoothly swing the door open to a certain rotation.
(This is all going into a script as you can see)
Any ideas because i looked at some answers but they seem to be obsolete or broken.
"Google is handy, give it a try." - Discord: XpNNmjc |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2017 10:48 PM |
| rotate the door to the position and rotation you want it to finish at then print and copy the output then move it back and print that and just use the 2 outputs as vars, that's the hard-coded/non-mathematical way of doing it |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2017 10:49 PM |
But it'll look ugly if i'm using lerp to smoothly rotate it.
"Google is handy, give it a try." - Discord: XpNNmjc |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2017 10:50 PM |
| if u want to do the math be my guest but i do that when i don't plan on moving an object or making more of the same object |
|
|
| Report Abuse |
|
|
tbnj123
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 443 |
|
|
| 23 Aug 2017 10:50 PM |
| primary part, setprimarypartcframe |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2017 10:56 PM |
I'm rotating a single part.^
"Google is handy, give it a try." - Discord: XpNNmjc |
|
|
| Report Abuse |
|
|
zectec
|
  |
| Joined: 24 Sep 2012 |
| Total Posts: 285 |
|
| |
|
tbnj123
|
  |
| Joined: 29 Oct 2010 |
| Total Posts: 443 |
|
|
| 24 Aug 2017 12:39 AM |
Center = Door.CFrame*CFrame.new(-2,0,0)
local its = 100
for i = 1, its do Door.CFrame = Center*CFrame.Angles(0,math.rad(90)*i/its,0)*CFrame.new(2,0,0) wait() end
manually instead of lerp best i could come up with just an example
door was a part, size 5, 8, 1 |
|
|
| Report Abuse |
|
|