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 / Collision DBP

Author
Message
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 25th Mar 2007 00:39
Ok after reading through these forums and wearing out the search feature I finally got collision to work. But I do have a problem. I am using the camera in a free flight mode. I would like to have the camera glide along the walls, floors and ceilings instead of just stopping. I think this is refered to as sliding collision? yes/no?
Does the tomb.dbo have to be on "set object collision to box" or can I leave it to polygon? I have read most of the slidding collision threads but didn't gain much from them..can someone simplify one of them...




Cheers!
RF


Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 25th Mar 2007 04:27
So, no one can even remotely answer this one?


RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 25th Mar 2007 07:05
Step 1: Realize that the native dbp collision commands arent going to give you desired sliding collision results fast enough and accurate enough.

I just read your email RF, i dont check it that often sorry. Anyways, mind telling me (im being serious, not sarcastic or trying to be a prick) what the function in the stickied Massive Collision thread on using sparky's dll for sliding collision, along with the examples in sparky's dll, is getting you so confused?

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 25th Mar 2007 11:15
I think it's when people give examples of how to use the code they usually sort it in a demo type app, at least that is what i have seen. The kind of stuff that i need is a no bulls description of each command. I looked through all of the help files that came with DBP and followed the tutorials, but it seems to me that it is assumed that everyone has a basic knowledge of the native commands. Now I have been tinkering with stuff and getting different thigns to work through trial and error. I think that people forget that when they write a tutorial it has to be understandable to all levels of understanding. Now i am now bashing anyone so I hop eno one takes it this way, but after reading through these boards and paying attention to how some of the turoials are written it's almos tlike the writer is trying to church things up to appear smarter....I could be wrong and I probably am.


Cheers,
RF


RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 25th Mar 2007 18:26
You're still talking about the native commands though.

I asked about sparky's dll, because I dont see whats hard about understanding it. The commands are extremely basic.

SC_setupObject: Sets up an object to be used with sparky's dll. Obviously then, you would call this command filling in the appropriate parameters. The params are very basic as well.

SC_sphereSlide ( objNum, oldx, oldy, oldz, x, y, z, radius, excludeObj ): Again, whats so hard here? All parameters are explained. This command will generate the new positions an object should be placed for sliding collision. objNum is the object you're detecting collision with, a map object for example. oldxyz is the player's old x y and z position... and x y z is the player's new x y and z position. radius is the radius of the collision sphere used, whats a collision sphere? Exactly what it says, a sphere (not a sphere object, just a mathematical sphere) positioned at the user's position that checks if any polygons from a map or whatever object you're colliding with are inside of it. So it usually makes sense to use a radius equal to the y size of your player / 2.

Alright, so far so good. You set up your map object with SC_setup, store the player's old and new positions, call the sphereslide command, and lastly;

Quote: "The final collision point, normal and slide point are in getCollisionSlide(0), or by using
no parameter getCollisionSlide() (defaults to 0). see the sliding demo for an example usage of this command. "
- from the dll help files for the sphereslide command

We use the getCollisionSlideX(), getCollisionSlideY(), and getCollisionSlideZ() commands to get the new positions for our player, and position them accordingly.

Pseudo:



I understand you're still learning programming, but when the help files explain exactly what each command does, its not rocket science. Does this help or do you need a detailed demo?

Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 26th Mar 2007 00:37
Ya know Ruccus, I think I was reading way to deep in to the help files and tutorials to tell ya the truth. I honestly just downloaded Sparkies DLL so I'm gona have a go with it. I think I was expecting something some secret little "hey, Don't tell the new guy anything" . After reading this last post, things are starting to make sense to me. I think my problem with coding is finding the correct structure to organize a program from the get go. But Ya got me on the right track mate. You can probably tell how easily my mind twists things up by how this post is written.

Cheers,
RF


Login to post a reply

Server time is: 2024-09-25 19:15:48
Your offset time is: 2024-09-25 19:15:48