Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Using sparkys raycasting for terrain height

Author
Message
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 21st Apr 2008 02:49
hey

I am currently using this code here to get the height of my .x terrain

terrainY#=10000-intersect object(groundNum, cubex#, 10000, cubez#, cubex#, -10000, cubez#)

It works however I want to use sparky's raycasting to do so because it is much faster.

note:
cubex# and cubez# are the x and z positions of my cube which is being repositioned.

Visit The Aex.Uni Forums

Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 21st Apr 2008 03:07
I found a solution, I was using the SC_rayCast command where I should have been using this:

terrainY#=10000-SC_intersectobject(groundNum, cubex#, 10000, cubez#, cubex#, -10000, cubez#)

thanks

Visit The Aex.Uni Forums

Login to post a reply

Server time is: 2024-11-25 06:45:51
Your offset time is: 2024-11-25 06:45:51