Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 07 Feb 2017 03:59 PM |
| ############## essentially trying to find the angle of change, i suppose filteringenabled or riot |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 07 Feb 2017 04:00 PM |
this is on print screen
/e5u0jr
filteringenabled or riot |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Feb 2017 04:18 PM |
Just get the angle between P1 and p.
V1:Dot(V2) == ||V1|| ||V2|| cos(anglebetween) thus:
angle = acos(V1:Dot(V2)/(||V1||*||V2||))
|
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 07 Feb 2017 04:21 PM |
already did it, thanks anyways tho
arithmetic.getAngle = function(vec1,vec2) local dot = vec1:Dot(vec2); dot = dot/(vec1.magnitude*vec2.magnitude); local acos = math.acos(dot); return math.deg(acos); end
filteringenabled or riot |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 07 Feb 2017 04:45 PM |
nvrm, trying yours
what do those two lines on each side represent
i would say math.abs but that's 1 line
filteringenabled or riot |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 07 Feb 2017 04:48 PM |
| uhm what you have is the exact same. The problem I assume you're having is that you're not accounting for the fact that the range of acos is [0, 180 degrees] |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 07 Feb 2017 04:53 PM |
well the problem is im trying to find the angle between two vector3's so i can utilize the rotation aspect of attachmentpoints with r15
filteringenabled or riot |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
| |
|
|
| 07 Feb 2017 05:13 PM |
| Hahaha, I have no idea what you guys are talking about. Time to go read some EgoMoose math tutorials. |
|
|
| Report Abuse |
|
|