Jump to content


Photo

Precise 3D Collisions Dll (P3DC.dll) V6.1


  • Please log in to reply
374 replies to this topic

#341 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 30 December 2011 - 09:04 AM

Are the ray tracing functions fast enough to be used 255x255 times per step without lag more than 10fps?
  • 0

#342 Ciberman

Ciberman

    GMC Member

  • New Member
  • 5 posts

Posted 31 December 2011 - 06:42 PM

Hello! First, I speak spanish. Sorry if I have any Mistake.
I have a problem with P3DC v6.00: the example 5 don't work correctly in v6.00 but it does in v5.00. the model rotations don't work. And I don't understand how p3dc_set_modrot works.
Thanks, Ciberman.
  • 0

#343 _239658

_239658

    GMC Member

  • New Member
  • 58 posts

Posted 02 January 2012 - 04:48 AM

how i general do i use this if i just want to add a collison between my player and an object that just has d3d_draw_walls on them?
i have objects that darw a walll so i can easily goto trhe room editor and make levels, but i never truly was able to make a good collsion script,
till i saw this but... its so confusing... any help ?
  • 0

#344 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 09 January 2012 - 05:34 PM

Are the ray tracing functions fast enough to be used 255x255 times per step without lag more than 10fps?

Why would you ever need to calculate 65025 rays per step...?
  • 0

#345 regular

regular

    GMC Member

  • New Member
  • 399 posts

Posted 10 January 2012 - 11:41 AM


Are the ray tracing functions fast enough to be used 255x255 times per step without lag more than 10fps?

Why would you ever need to calculate 65025 rays per step...?

I want to have dynamic shadows of animated models over uneven(slopy) terrain. I cant think of any other way to achieve this.
  • 0

#346 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 10 January 2012 - 02:55 PM



Are the ray tracing functions fast enough to be used 255x255 times per step without lag more than 10fps?

Why would you ever need to calculate 65025 rays per step...?

I want to have dynamic shadows of animated models over uneven(slopy) terrain. I cant think of any other way to achieve this.



Well, if you're going to do that, use the split functions, it'll help reduce the amount of processing power that is going to require.
  • 0

#347 Doyora

Doyora

    GMC Member

  • New Member
  • 40 posts

Posted 25 January 2012 - 01:50 PM

I'm trying to use the Ray function at the moment. However, since I have to define the ID of a model that I am trying to hit, I can't use it for interacting with other objects with a model that will not always be the same. Is this true? Could anyone help me with this at all please?

Thanks
  • 0

#348 M_I_Soft

M_I_Soft

    GMC Member

  • GMC Member
  • 198 posts
  • Version:GM8

Posted 02 February 2012 - 09:56 PM

Well, if you're going to do that, use the split functions, it'll help reduce the amount of processing power that is going to require.


Even so, as I've found, the ray functions can be laggy if you do too many at once. I'm using them for steering on the ai, if I can make it fast enough for lots and lots of ai... :)
As it stands though the p3dc_ray_split isn't quick enough to handle a full steering system with only 3 feelers on more than about 4 ai's on my dev laptop (kept as a baseline - ideal to dev on). Tried p3dc_ray_first but it seemed to miss glaringly obvious parts of the main collision model - like a huge house that it was wiping it's face up against, which just happens to be being picked up by the normal p3dc_check_split commands :(
  • 0

#349 THE_GAME_EDITOR

THE_GAME_EDITOR

    GMC Member

  • GMC Member
  • 798 posts
  • Version:GM8.1

Posted 09 February 2012 - 09:36 PM

Ignore this Posted Image

Edited by THE_GAME_EDITOR, 13 February 2012 - 08:40 PM.

  • 0

#350 brett14

brett14

    GMC Member

  • GMC Member
  • 1150 posts
  • Version:GM8

Posted 11 February 2012 - 10:06 AM

Due to the fact that I am unable to keep P3DC up to date, fix errors or even help people with their problems, I have decided to make it open source. Please see the first post for the download link. Don't expect anything fancy though, it was my first DLL and second C++ project (first was a hello world application)


Thanks
~~Brett14;

Edited by brett14, 11 February 2012 - 10:51 AM.

  • 0

#351 lostdarkwolf

lostdarkwolf

    GMC Member

  • GMC Member
  • 389 posts
  • Version:GM8.1

Posted 20 February 2012 - 09:03 AM

something must have happened? you signed up for more obligations or personal problems. hope its not the second. :thumbsup:
  • 0

#352 brett14

brett14

    GMC Member

  • GMC Member
  • 1150 posts
  • Version:GM8

Posted 20 February 2012 - 06:01 PM

It's more so the fact that I've been working on other projects that are of much more interest to me than gamemaker. IE: GDS, and other C++ projects
  • 0

#353 BlazzeSolla

BlazzeSolla

    GMC Member

  • New Member
  • 1 posts
  • Version:GM8

Posted 21 February 2012 - 04:24 PM

Hey i'm making a 3d game and I cant figure out how to get the model into the game Ive used a model fixer designed for and in game maker and it will not load using this DLL, or at all for that matter, I keep getting a message saying

___________________________________________
ERROR in
action number 1
of Create Event
for object obj_Player:

Error defining an external function.


Any ideas or do I need to give more information??
  • 0

#354 brett14

brett14

    GMC Member

  • GMC Member
  • 1150 posts
  • Version:GM8

Posted 21 February 2012 - 04:47 PM

Make sure P3DC is included in the same directory as the game. Make sure you are using the correct scripts for the particular version of P3DC you are using.
  • 0

#355 brett14

brett14

    GMC Member

  • GMC Member
  • 1150 posts
  • Version:GM8

Posted 16 March 2012 - 07:46 PM

Updated to V6.1, only 1 change was made.
m = sqrt(normalx*normalx+normaly*normaly+normalz*normalz);
normalx /= m;
normaly /= m;
normalz /= m;
was changed to
m = sqrt(normalx*normalx+normaly*normaly+normalz*normalz);
if(m == 0.0)m = 0.000000001;
normalx /= m;
normaly /= m;
normalz /= m;
Fixing a divide by zero error some people were having. Enjoy!!

PS: Check out my newest project: GameDev Studio

Cheers
~~Brett14;
  • 0

#356 Darth-Zeke

Darth-Zeke

    GMC Member

  • GMC Member
  • 10 posts

Posted 04 April 2012 - 02:56 AM

Has anyone had a problem with p3dc_ray_split? I created a model from default shapes, split it, and did p3dc_check_split which worked fine; but then p3dc_ray_split was returning incorrect values. Right now I have it working in an unoptimized way by checking each model individually instead of adding them all together and checking ray casts on the split model.
  • 0

#357 aaron-1995

aaron-1995

    GMC Member

  • New Member
  • 85 posts

Posted 17 April 2012 - 11:44 AM

Hello! First, I speak spanish. Sorry if I have any Mistake.
I have a problem with P3DC v6.00: the example 5 don't work correctly in v6.00 but it does in v5.00. the model rotations don't work. And I don't understand how p3dc_set_modrot works.
Thanks, Ciberman.


Hello.
Yes you are correct, example 5 at no point uses p3dc_set_modrot() and still has the arguments for rotation input into the ray-rotation script. Also i was wondering, P3DC used (or uses) Euler rotations for its collision checking. in the script p3dc_set_modrot it says the following:
[Arg0-2]: Creates a vector that represent the models rotation
Arg0: Vector X component
Arg1: Vector Y component
Arg2: Vector Z component

is this still Euler rotation? it is actually helpful if it is not Euler but i would like to make sure, also, if it is a different type of vector, which way does the vector go if the model is, for example facing along the x axis, is it in that direction? so 1,0,0? but i guess then it wouldnt know roll.. hmm, oh well i dont understand exactly how Euler rotations work so i may be way off, but anyway..
Thankyou!

-Aaron

Edited by aaron-1995, 17 April 2012 - 11:48 AM.

  • 0

#358 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 19 April 2012 - 02:43 PM

Has anyone had a problem with p3dc_ray_split? I created a model from default shapes, split it, and did p3dc_check_split which worked fine; but then p3dc_ray_split was returning incorrect values. Right now I have it working in an unoptimized way by checking each model individually instead of adding them all together and checking ray casts on the split model.



the split methods, from what I've found, are really only useful in terms of calculating collisions for a player of sorts, where most of the rays vertors' are facing down.
:)
  • 0

#359 Pandaboy

Pandaboy

    GMC Member

  • GMC Member
  • 518 posts

Posted 28 April 2012 - 03:21 PM

PS: Check out my newest project: GameDev Studio


Looking really awesome dude :D!
screenshots remind me a bit of gamemaker :3
  • 0

#360 aaron-1995

aaron-1995

    GMC Member

  • New Member
  • 85 posts

Posted 19 May 2012 - 11:32 AM

ok.. does anyone know how to fix example 5 in p3dc version 6.1? because it doesnt work since p3dc_set_modrot() and i can not figure out how to use it... thanks

Edited by aaron-1995, 19 May 2012 - 12:30 PM.

  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users