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.

DLL Talk / Sparkys: Just . . .Cant. . . .Slide. . .

Author
Message
StevetS
19
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 7th Dec 2008 22:57 Edited at: 7th Dec 2008 22:58
Hi,

I'm trying to get my head round using Sparky's as an alternative to the inbuilt DBPro collision commands and am having a problem with my understanding of sliding collision.

I've attached a little demo program and I want to slide the red ball around the white ball when the two come into contact. The program recognises the collision with 'sc_objectcollision()' but I don't appear to be correctly using 'sc_sphereslide()' or 'sc_getcollisionslidex/y/z()'.

Any help or pointers into just where I'm going wrong would be appreciated:



It must be something quite simple but I'm stumped

Thanks in advance.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 8th Dec 2008 19:01
It was happening so fast you couldn't see it.

Replace :



With :



You were already positioning the object using ax#,ay#,az# but you have to set those to the new position once the collision occurs.

StevetS
19
Years of Service
User Offline
Joined: 19th May 2004
Location:
Posted: 8th Dec 2008 19:50
Ah I see! I was bypassing part of the co-ordinate system by directly positioning the object with the slide points in the command rather than passing them into the co-ordinates and updating on the next loop!

That works great now - thanks for the help KISTech.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 9th Dec 2008 00:59
No problem.

Login to post a reply

Server time is: 2024-04-19 18:38:24
Your offset time is: 2024-04-19 18:38:24