|
| 18 Aug 2016 10:42 PM |
https://www.roblox.com/Open-source-radar-item?id=483393341
Credit goes to some free models I examined + a video on youtube.
-R.B. Box (Regalius Boxikins Box) |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 18 Aug 2016 10:50 PM |
thats what, just like, toObjectSpace?
$.post('http://Spam',{}) |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 18 Aug 2016 10:51 PM |
my b
vectorToObjectSpace
$.post('http://Spam',{}) |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 11:05 PM |
@Isosta
I don't know what that is, I learned from some free models and a few tutorials. I haven't taken trig yet.
-R.B. Box (Regalius Boxikins Box) |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 11:20 PM |
vectorToObjectSpace is really simple, you give it a Vector3 and it returns a rotated Vector3. An example makes this really clear:
Say I have some part and I rotate it 90 degrees along the y-axis (so the CFrame's "right" direction is now the world's forward direction.
The object-space of "right" will always be (1, 0, 0) But in this case, the world-space would be (0, 0, -1) as it's now facing the world direction.
What vectorToObjectSpace will do is convert the bottom one to the top, that is you give it a Vector3 in world-space and returns the rotated object-space equiv.
local cf = CFrame.Angles(0, math.pi/2, 0) -- 90 degree rotation local objRight = Vector3.new(1, 0, 0) local worldRight = cf:vectorToWorldSpace(Vector3.new(1, 0, 0)) local objRightFromWorldRight = cf:vectorToObjectSpace(worldRight)
objRight == objRightFromWorldRight == Vector3.new(1, 0, 0) and worldRight == Vector3.new(0, 0, -1)
Essentially, the "worldRight" is the actual direction of the "right direction" of the CFrame, whereas "objRight" is the direction relative to the orientation of the CFrame. |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 11:21 PM |
| as it's now facing the world's forward** (-z) |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 11:25 PM |
I don't understand, can you try and make it simple :/
-R.B. Box (Regalius Boxikins Box) |
|
|
| Report Abuse |
|
|
|
| 18 Aug 2016 11:27 PM |
| The `right` direction is always (1, 0, 0) in object-space, but depending on how the CFrame is rotated it won't necessarily be (1, 0, 0) in world-space. |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 18 Aug 2016 11:46 PM |
world space explanation:
http://prntscr.com/c7l7zj
The green line being the direction from partA to partB, and the black arrow being the lookVector of partA. No matter what the rotation of partA, the world space of partB never changes. the objectSpace, however, is based completely on the position and rotation of PartA.
toObjectSpace == CFrame:inverse() * cf toWorldSpace == CFrame * cf
$.post('http://Spam',{}) |
|
|
| Report Abuse |
|
|