JDCustard
|
  |
| Joined: 07 Mar 2015 |
| Total Posts: 36 |
|
|
| 20 Apr 2016 04:03 AM |
Is there any way that you can make an object have a certain rotation even when the model moves. I have an aircraft and I want the aileron to rotate when you turn. I know you would do this with cframe but I do not know how I implement it to happen when the aircraft is rotated on way or another, can anyone help.
This is what I mean: https://en(.)m.wikipedia.org/wiki/Aileron Remove bracket
Thanks. |
|
|
| Report Abuse |
|
|
Auzer
|
  |
| Joined: 24 Dec 2011 |
| Total Posts: 1590 |
|
|
| 20 Apr 2016 07:59 AM |
| Have a certain rotation even when the model moves? You're telling me that every time the model moves, the rotation reverts to its previous state? |
|
|
| Report Abuse |
|
|
JDCustard
|
  |
| Joined: 07 Mar 2015 |
| Total Posts: 36 |
|
|
| 20 Apr 2016 11:47 AM |
| Yeah so I want the rotation to be 0 when the aircraft moves. What ever axis its on, Think it is X |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2016 11:49 AM |
here is what you do
set a normal rotation as a cframe(this would be what you want it to reset to)
when you move the model via cframe or :MoveTo,
set the cframe to your normal rotation cframe
if you don't know how to set a model's rotation just use SetPrimaryPartCFrame
#Code print("Narwhals are our future") |
|
|
| Report Abuse |
|
|
JDCustard
|
  |
| Joined: 07 Mar 2015 |
| Total Posts: 36 |
|
|
| 24 Apr 2016 09:37 AM |
| Thanks for the help I will give it a go. |
|
|
| Report Abuse |
|
|