Jump to content

Raycast not in a exact position


syed samoon
 Share

Recommended Posts

when i create and use raycast in my scene it is in not in exact position 

means the below code is i'm using. based on the code the ray can be in straight line towards z axis but it is inclined

var front = new BABYLON.Ray();
var frontHelper = new BABYLON.RayHelper(front);
var frontLocalMeshDirection = new BABYLON.Vector3(0, 0, 500);
var frontLocalMeshOrigin = new BABYLON.Vector3(0, 0, 1);
var frontLength = 3;
frontHelper.attachToMesh(this.__this.player, frontLocalMeshDirection, frontLocalMeshOrigin, frontLength);
frontHelper.show(this.__this.scene);
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...