You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/classes/Geometry3D.xml
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,17 @@
73
73
Given the two 3D segments ([param p1], [param p2]) and ([param q1], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([param p1], [param p2]) as well the accompanying point on ([param q1], [param q2]).
74
74
</description>
75
75
</method>
76
+
<methodname="get_triangle_barycentric_coords">
77
+
<returntype="Vector3" />
78
+
<paramindex="0"name="point"type="Vector3" />
79
+
<paramindex="1"name="a"type="Vector3" />
80
+
<paramindex="2"name="b"type="Vector3" />
81
+
<paramindex="3"name="c"type="Vector3" />
82
+
<description>
83
+
Returns a [Vector3] containing weights based on how close a 3D position ([param point]) is to a triangle's different vertices ([param a], [param b] and [param c]). This is useful for interpolating between the data of different vertices in a triangle. One example use case is using this to smoothly rotate over a mesh instead of relying solely on face normals.
84
+
[url=https://en.wikipedia.org/wiki/Barycentric_coordinate_system]Here is a more detailed explanation of barycentric coordinates.[/url]
Copy file name to clipboardExpand all lines: doc/classes/PhysicsDirectSpaceState3D.xml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,8 @@
67
67
[code]collider_id[/code]: The colliding object's ID.
68
68
[code]normal[/code]: The object's surface normal at the intersection point, or [code]Vector3(0, 0, 0)[/code] if the ray starts inside the shape and [member PhysicsRayQueryParameters3D.hit_from_inside] is [code]true[/code].
69
69
[code]position[/code]: The intersection point.
70
+
[code]face_index[/code]: The face index at the intersection point.
71
+
[b]Note:[/b] Returns a valid number only if the intersected shape is a [ConcavePolygonShape3D]. Otherwise, [code]-1[/code] is returned.
70
72
[code]rid[/code]: The intersecting object's [RID].
71
73
[code]shape[/code]: The shape index of the colliding shape.
72
74
If the ray did not intersect anything, then an empty dictionary is returned instead.
Copy file name to clipboardExpand all lines: doc/classes/RayCast3D.xml
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,12 @@
59
59
Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]).
Returns the collision object's face index at the collision point, or [code]-1[/code] if the shape intersecting the ray is not a [ConcavePolygonShape3D].
0 commit comments