|
@@ -43,7 +43,7 @@ export class PickingInfo {
|
|
/** If a sprite was picked, this will be the sprite the pick collided with */
|
|
/** If a sprite was picked, this will be the sprite the pick collided with */
|
|
public pickedSprite: Nullable<Sprite> = null;
|
|
public pickedSprite: Nullable<Sprite> = null;
|
|
|
|
|
|
- /** If we are pikcing a mesh with thin instance, this will give you the picked thin instance */
|
|
|
|
|
|
+ /** If we are picking a mesh with thin instance, this will give you the picked thin instance */
|
|
public thinInstanceIndex = -1;
|
|
public thinInstanceIndex = -1;
|
|
/**
|
|
/**
|
|
* If a mesh was used to do the picking (eg. 6dof controller) this will be populated.
|
|
* If a mesh was used to do the picking (eg. 6dof controller) this will be populated.
|
|
@@ -55,10 +55,10 @@ export class PickingInfo {
|
|
public ray: Nullable<Ray> = null;
|
|
public ray: Nullable<Ray> = null;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Gets the normal correspodning to the face the pick collided with
|
|
|
|
|
|
+ * Gets the normal corresponding to the face the pick collided with
|
|
* @param useWorldCoordinates If the resulting normal should be relative to the world (default: false)
|
|
* @param useWorldCoordinates If the resulting normal should be relative to the world (default: false)
|
|
* @param useVerticesNormals If the vertices normals should be used to calculate the normal instead of the normal map
|
|
* @param useVerticesNormals If the vertices normals should be used to calculate the normal instead of the normal map
|
|
- * @returns The normal correspodning to the face the pick collided with
|
|
|
|
|
|
+ * @returns The normal corresponding to the face the pick collided with
|
|
*/
|
|
*/
|
|
public getNormal(useWorldCoordinates = false, useVerticesNormals = true): Nullable<Vector3> {
|
|
public getNormal(useWorldCoordinates = false, useVerticesNormals = true): Nullable<Vector3> {
|
|
if (!this.pickedMesh || !this.pickedMesh.isVerticesDataPresent(VertexBuffer.NormalKind)) {
|
|
if (!this.pickedMesh || !this.pickedMesh.isVerticesDataPresent(VertexBuffer.NormalKind)) {
|
|
@@ -120,8 +120,8 @@ export class PickingInfo {
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * Gets the texture coordinates of where the pick occured
|
|
|
|
- * @returns the vector containing the coordnates of the texture
|
|
|
|
|
|
+ * Gets the texture coordinates of where the pick occurred
|
|
|
|
+ * @returns the vector containing the coordinates of the texture
|
|
*/
|
|
*/
|
|
public getTextureCoordinates(): Nullable<Vector2> {
|
|
public getTextureCoordinates(): Nullable<Vector2> {
|
|
if (!this.pickedMesh || !this.pickedMesh.isVerticesDataPresent(VertexBuffer.UVKind)) {
|
|
if (!this.pickedMesh || !this.pickedMesh.isVerticesDataPresent(VertexBuffer.UVKind)) {
|