Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

What does CFrame.p Mean?

Asked by 10 years ago

What does CFrame.p Mean? Its in a wiki ray casting script

local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit*300)

1 answer

Log in to vote
2
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

Just a head's up, try searching the wiki first for Object members or properties.

As it says there, the p member of a CFrame object is a Vector3 that represents the X, Y, Z Position of the CFrame, without rotation.

Both mouse.Hit and tool.Handle.CFrame use the p member, because they are both CFrame objects.

1
Put succinctly -- A CFrame's `p` is the *position* of the CFrame, forming a Vector3. The position lacks the orientation (rotation) information that the CFrame has. BlueTaslem 18071 — 10y
Ad

Answer this question