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 GDK / Sparkys Collision and DirectX models

Author
Message
Trullion
15
Years of Service
User Offline
Joined: 1st Oct 2009
Location:
Posted: 30th Mar 2010 22:58
There seems to be quite a few posts about problems with collision and directX models. I am having a problem with them as well. I am using the Delgine creator by Deled to create my .X model and they are importing into DarkGDK just fine. However I am having a problem ray casting a collision with with them. Below is the code I wrote to create the level terrain.



You will notice that there are four object created. The first is the terrain created form a bitmap image. The second is a .X file called tower. The third and fourth are two boxes, walls so to speak. I can get Sparkys raycast collision to find the ground, and the two boxes. When my Character collides with them it stops like it should. However I cannot seem to get any collision data with the tower. Anyone have any ideas?
Trullion
15
Years of Service
User Offline
Joined: 1st Oct 2009
Location:
Posted: 31st Mar 2010 00:01
Having done some more experimentation, I found that for whatever reason, the problem was do to the fact that I scaled the tower down in size.

Here is the edited code:


Notice that I moved the dbScaleObject to after the dbSetupObject, and then used the SC_AllowObjectScaling followed by SC_UpdateObject.

I am under the impression that using SC_AllowObjectScaling is somewhat slower. Is there a better way to do this?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 31st Mar 2010 11:42
You could try my plug-in, in sig, I need people to test it.
Once set up it takes alot less coding for collision, unless you want to code collision of course.

Trullion
15
Years of Service
User Offline
Joined: 1st Oct 2009
Location:
Posted: 31st Mar 2010 21:40
I will be taking a look at it. I already downloaded it to my machine. Does it replace Sparkys? Or is it in addition to?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 31st Mar 2010 23:25
You should not really need sparkys with this, if you do, tell me what for, and I'll add it to Fulcrum.

Trullion
15
Years of Service
User Offline
Joined: 1st Oct 2009
Location:
Posted: 1st Apr 2010 00:02
I just needed to know about Sparkys because I used it to code my own collision system. I will have to recode it to work with yours I think. No biggie.Ill let you know what I think in a few days.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 1st Apr 2010 00:10
Yeh, maybe don't abandon sparky's if you have already coded alot of your game with it.
Perhaps setup a small test program to see whether Fulcrum will do everything you need and if it makes life any easier, if it doesn't, let me know what was missing/wrong.

Sorry I can't help with Sparky's problem, I have done very little with it. I can't see why SC_allowObjectScaling() would make it slower, do you actually see a slowdown when you use this command?

Login to post a reply

Server time is: 2024-10-02 03:23:53
Your offset time is: 2024-10-02 03:23:53