rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
|
| 13 Jul 2011 06:01 PM |
x,y,z = character.Head.CFrame:toEulerAnglesXYZ() x2,y2,z2 = workspace.CurrentCamera.CoordinateFrame:toEulerAnglesXYZ() Weld.C1 = CFrame.Angles(-x + x2,-y + y2,-z + z2)
If I am correct, this SHOULD point towards the camera. I guess by those means I am wrong.
When the y-axis goes negative, all the controls flip, except for the y-axis. Any way to fix this? I can take video to show you the problem, if you have an XF |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 06:04 PM |
CFrame.new(character.Head.Position,workspace.CurrentCamera.CoordinateFrame.p) That points from the head to the camera, probleme?
~Monica |
|
|
| Report Abuse |
|
|
rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
|
| 13 Jul 2011 06:04 PM |
| The y-axis being 'side to side' if you will |
|
|
| Report Abuse |
|
|
rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
| |
|
rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
|
| 13 Jul 2011 06:06 PM |
| ah, my bad. I ment to say have the same rotation as the camera |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 06:07 PM |
Uh... I don't know what you mean by that, maybe tell me what you're trying to make with this?
~Monica |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
|
| 13 Jul 2011 06:11 PM |
A brick facing the same direction as the camera is.
I am trying to simulate that with welds, but not having much success. |
|
|
| Report Abuse |
|
|
rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
|
| 13 Jul 2011 06:12 PM |
| It doesnt? Can you explain for me, then, oysi? |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2011 06:13 PM |
So weld.C1 = workspace.CurrentCamera.CoordinateFrame+(workspace.CurrentCamera.CoordinateFrame.p-weld.Parent.Position); You might have to change the second part to negative or something... Idk. ~Monica |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 13 Jul 2011 06:16 PM |
I like my complex way better.
~Monica |
|
|
| Report Abuse |
|
|
rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
|
| 13 Jul 2011 06:18 PM |
| Thanks. But I'd like to know why my way did work so I can avoid it next time. |
|
|
| Report Abuse |
|
|
rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
| |
|
|
| 13 Jul 2011 06:21 PM |
For one, you're using the angles from an object that has no relation to the other object...
~Monica |
|
|
| Report Abuse |
|
|
rulzalot
|
  |
| Joined: 05 Jul 2009 |
| Total Posts: 6305 |
|
|
| 13 Jul 2011 07:26 PM |
| Uhm excuse me, but none of these worked, and in term I did my own trouble shooting. I came to find that the objects y-rotational axis was being doubled and found the reason was, was because since I was using a weld, the y axis came out to be the heads rotation + the other objects rotation. Therefor causing it to double, like I mentioned before. How do I combat this problem? |
|
|
| Report Abuse |
|
|