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.

Dark Physics & Dark A.I. & Dark Dynamix / is there a commands like "phy get distance to ground"?

Author
Message
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 8th Sep 2010 06:28
Is there a command like this in darkphysics (or anything in the DGS bonanza)? I need to figure out how close the player (or any object) is to anything below it, and preferably in one code

I want coke, not Pepsi!
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 8th Sep 2010 12:54
You can use a raycast:



The first 3 parameters are the position the raycast will start.
The 3 last is the direction (x#,y#,z#).

So this raycast would move downwards.

After doing the raycast you can fetch data by using commands like:



And so on.

9cdfb439c7876e703e307864c9167a15
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 8th Sep 2010 17:21
phy get ray cast distance ( )
phy get ray cast object ( )
phy get ray cast hit point x ( )

how does it know which ray cast and how does it return the value? is it like raydist#=phy get ray cast distance ( )?

I want coke, not Pepsi!
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 8th Sep 2010 18:54
Dark Physics automatically stores the last raycast's data. So you simply do the raycast (doesnt return any values), then you can retrieve them from dark physics by using the other commands.

9cdfb439c7876e703e307864c9167a15
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 8th Sep 2010 21:01
Quote: "So you simply do the raycast (doesnt return any values), then you can retrieve them from dark physics by using the other commands."


to do that its like raydist#=phy get ray cast distance ( )?
or else how do I know the value of it?

I want coke, not Pepsi!
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 8th Sep 2010 23:28
The only raycast command which doesn't return a value is

phy ray cast all shapes


Quote: "to do that its like raydist#=phy get ray cast distance ( )?"

Yes.

9cdfb439c7876e703e307864c9167a15

Login to post a reply

Server time is: 2024-03-28 12:35:44
Your offset time is: 2024-03-28 12:35:44