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 / Ray casting values return 0

Author
Message
Kaisertal
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: The Netherlands
Posted: 22nd Oct 2008 00:35
In the DarkPhysics RayCasting example I've added 2 lines to print the raycast distance and hitpoint y.

But... both return 0 ?!


` if the ray hit something then colour that object blue
if phy get ray cast hit( )= 1
color object phy get ray cast object ( ), rgb ( 0, 0, 255 )

text 0,100,str$(phy get ray cast distance() )
text 0,116,str$(phy get ray cast hit point y() )

endif
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 22nd Oct 2008 02:29
I'm not seeing any code showing how you're casting your ray.

Everything I needed to know about trigonometry, I learned by becoming a game programmer.
Kaisertal
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: The Netherlands
Posted: 22nd Oct 2008 08:53
this is the full code (taken from the examples folder) including the 2 lines that should display the raycast length and y hitpoint


peterJBE
16
Years of Service
User Offline
Joined: 11th Mar 2008
Location: Belgium
Posted: 22nd Oct 2008 13:44
@Kaisertal
Your code seems to work on my system.
values returned: 17.5 and 2.5
I use DBPRO 7.0 and the previous versions of DP
Kaisertal
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: The Netherlands
Posted: 22nd Oct 2008 21:49
I've upgraded to dbpro 7.0, but both values still remain 0 (see image)

It's running in software mode - could that be the cause?


peterJBE
16
Years of Service
User Offline
Joined: 11th Mar 2008
Location: Belgium
Posted: 23rd Oct 2008 09:00
I run in software mode too.
This can not be the problem.
Kaisertal
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: The Netherlands
Posted: 24th Oct 2008 16:46
Anyone any suggestions? i'm kind of stuck now
sindore
19
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 24th Oct 2008 21:32
here is the raycasting code I used some time ago have a look on this link at the top code, its not that amazing but it sould help you a bit.
http://forum.thegamecreators.com/?m=forum_view&t=127692&b=30

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
Kaisertal
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: The Netherlands
Posted: 24th Oct 2008 21:59
Thanks Sindore, but I can't get your code to run.

The 'closest shape' raycast command is not recognized, so i've replaced that with 'all shapes', but still i get an error : Rigid body width specified ID does not exit.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Oct 2008 22:12
Kaisertal repair the physX side as it looks like it on the blink, you should get values that peterJBE had.

Dark Physics makes any hot drink go cold.
Kaisertal
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: The Netherlands
Posted: 24th Oct 2008 22:27
Thanks Howdo, that was the problem - i've reinstalled the physx side and i now finally get the correct values back!
sindore
19
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 24th Oct 2008 22:53
well then heres what I've got and it is fall raycast work ablity, but then I never got the new dp v1.5 to work and I think that I'm glade about that.

the amount of bug ever one has had is mind blowing, I have the old 1.4 files if any one wonts them.

but I need to check to see if its ok if I post them or not.

if its ok to post the old dp v1.4 then I'll say one thing, be cos of the new update liquied particals are invisable, when the old 1.4 version is aplied over the top of the 1.5 version.

roll on dp 1.6 we need it!

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!

Login to post a reply

Server time is: 2024-05-18 06:57:14
Your offset time is: 2024-05-18 06:57:14