eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 17 Nov 2012 06:27 AM |
So I have a fake head which welds to the normal head and turns according to where the mouse is pointing. I use this line:
headweld.C1 = CFrame.new(character.Head.Position,mouse.Hit.p):inverse()
But it doesn't work as expected, the head appears floating like 100 studs above the character.
Does anyone know about CFrame maths? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2012 06:46 AM |
| headweld.C1 = CFrame.new(character.Head.Position, character.Humanoid.TargetPoint) |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 17 Nov 2012 08:13 AM |
Nope, but thanks anyway.
The issue isn't the mouse, it's the CFrame maths. |
|
|
| Report Abuse |
|
|
Fredfishy
|
  |
| Joined: 21 Mar 2009 |
| Total Posts: 4197 |
|
|
| 17 Nov 2012 09:05 AM |
@eJorge, I believe TargetPoint gives you something relative to your player or something, so at least try it. |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 17 Nov 2012 01:32 PM |
| Again, it's the maths what I need to fix. |
|
|
| Report Abuse |
|
|
Fredfishy
|
  |
| Joined: 21 Mar 2009 |
| Total Posts: 4197 |
|
|
| 17 Nov 2012 04:08 PM |
@eJorge Again, the value TargetPoint gives you is different and relative to the player, so it may fix your problem. |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 17 Nov 2012 04:56 PM |
You don't understand me :l
Does someone know the expression to make this work in a weld? |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
| |
|