Jump to content
gc8

Get terrrain pos

Recommended Posts

Hi

does anyone know how you can get position on terrain where the player is aiming? I want to ignore houses and get terrain pos only.

I know there's many intersect commands but haven't figured which one to use yet.

 

I'm using this code to get 3D pos but it returns position on the houses etc.

 

_wpos = screenToWorld getMousePosition;

 

thx!

Share this post


Link to post
Share on other sites

Use lineIntersectsSurfaces with cursorObject as one of the objects to ignore :shrug:

Share this post


Link to post
Share on other sites
1 minute ago, h - said:

Use lineIntersectsSurfaces with cursorObject as one of the objects to ignore :shrug:

 

thx. I was able to get some vector that goes underground so that lineIntersectsSurfaces returns the terrain surface. works pretty good 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×