Jump to content


Photo

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


  • Please log in to reply
375 replies to this topic

#321 blopit

blopit

    KING OF EVERYTHING

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

Posted 15 October 2011 - 10:25 PM

how to use p3dc_set_modrot()? Cant seem to create rotated primitive masks
  • 0

#322 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 416 posts
  • Version:GM8

Posted 07 November 2011 - 05:53 PM

p3dc_add_triangle() does not work !
it just ends the game without any error report O.o

I changed it, exporting the model, then loading it with
p3dc_add_model()
the same thing happens again :(

however all the other functions work well :D (p3dc_add_block(), collition detection, etc ...)

No idea how to solve it .... any help appreciated !

Note : I used to use p3dc in my older projects ! but this time it crashes !!!!
  • 0

#323 topmarine

topmarine

    GMC Member

  • New Member
  • 122 posts
  • Version:GM8.1

Posted 08 November 2011 - 03:21 AM

Well in my game my crosshair moves not my player. Moving code. Please help thanks

friction = 0.5

if mouse_check_button_pressed(mb_left) then
{
var obj;
obj = instance_create(x,y,obj_bullet)
obj.z = z
obj.speed = 10
obj.zdir = (zto-z)/(100/obj.speed)
obj.direction = direction
}

var dis;

if mouse_check_button(mb_right) then zoom = 40 else zoom = 0

if(keyboard_check(vk_left) or keyboard_check(ord('A'))){
x+=lengthdir_x(0.4*(keyboard_check(vk_shift)+1),direction+90);
y+=lengthdir_y(0.4*(keyboard_check(vk_shift)+1),direction+90);
}
if(keyboard_check(vk_right) or keyboard_check(ord('D'))){
x+=lengthdir_x(0.4*(keyboard_check(vk_shift)+1),direction-90);
y+=lengthdir_y(0.4*(keyboard_check(vk_shift)+1),direction-90);
}
if(keyboard_check(vk_up) or keyboard_check(ord('W'))){
x+=lengthdir_x(0.4*(keyboard_check(vk_shift)+1),direction);
y+=lengthdir_y(0.4*(keyboard_check(vk_shift)+1),direction);
}
if(keyboard_check(vk_down) or keyboard_check(ord('S'))){
x+=lengthdir_x(0.4*(keyboard_check(vk_shift)+1),direction-180);
y+=lengthdir_y(0.4*(keyboard_check(vk_shift)+1),direction-180);
}
  • 0

#324 Boreal

Boreal

    C++ Wackjob

  • GMC Member
  • 417 posts
  • Version:None

Posted 12 November 2011 - 06:00 PM

Is only using raycasts a viable way to check collisions for a 3D platformer? Would you do a few raycasts spread across a circle to check the bottom (and sliding along a plane found with the averaged distances) and then raycasts forward from the "front" of the circle about halfway up to check for walls (again, sliding along a plane found from the averaged distances)? Here's an image to describe what I mean if my explanation isn't good:

Posted Image
  • 0

#325 JurrePs3

JurrePs3

    GMC Member

  • New Member
  • 3 posts
  • Version:GM8

Posted 21 November 2011 - 07:28 AM

Hi all,

First of all i want to make a verry basic fps using this.
but if i load a map(.3d3) the game starts but then windows says : (FILENAME).exe doesnt work anymore.
And then te game stops, the examples with the external map work, but if i wanna change them i get that error?!
Im using Game Maker 8, on a 64bit win 7 pc.


Regards,
Jurre
  • 0

#326 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 02 December 2011 - 10:00 PM

I'm having big trouble with P3DC :

-First, (as other people said before, I think) I can't load my d3d maps ! They're made in Sketchup, exported to .obj or and then converted to d3d using GmModelFix, but I only have an unexpected error !

-Second, I NEED to change a little the built-in collision checking code (in the examples). I want to implent rotation support (player collision model can rotate). What I obtain : player is stucking in walls.
I know I must add something in the 2nd and 3rd blocks
of code (inside the 1st block).
But I can't really imagine what.
Code :

//End Step Event. Original code from P3DC's examples. Changed a bit for specific use in own game.

arg0=playerCollisionId
arg1=0.25 (arbitrary value)
arg2=6-crouch (Z height of model)
arg3=global.levelCollisionId

var tox,toy;
tox=x
toy=y
x=xprevious
y=yprevious
tdir=point_direction(x,y,tox,toy);
tdist=point_distance(x,y,tox,toy);

if(p3dc_check_rotation(argument0,tox,toy,z-argument2*0.6,argument3,0,0,0,0,0,dir_look)==1){
        if(p3dc_check_rotation(argument0,x+lengthdir_x(argument1,tdir),y,z-argument2*0.6,argument3,0,0,0,0,0,dir_look)==0){
        x+=lengthdir_x(argument1,tdir/*+radtodeg(arctan(p3dc_triangle_data(11)))*/)
        }
        if(p3dc_check_rotation(argument0,x,y+lengthdir_y(argument1,tdir),z-argument2*0.6,argument3,0,0,0,0,0,dir_look)==0){
        y+=lengthdir_y(argument1,tdir/*+radtodeg(arctan(p3dc_triangle_data(11)))*/)
        }
        }else{
    x=tox
    y=toy
    }

Thanks to all, and please help !

Edited by NikaB, 02 December 2011 - 10:05 PM.

  • 0

#327 JurrePs3

JurrePs3

    GMC Member

  • New Member
  • 3 posts
  • Version:GM8

Posted 03 December 2011 - 02:01 PM

I'm having big trouble with P3DC :

-First, (as other people said before, I think) I can't load my d3d maps ! They're made in Sketchup, exported to .obj or and then converted to d3d using GmModelFix, but I only have an unexpected error !



Im also still having this problem, but it seems like nobody responds on this forum :s
\
Jurre
  • 0

#328 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 04 December 2011 - 10:04 AM

I'm having big trouble with P3DC :

[...]

-Second, I NEED to change a little the built-in collision checking code (in the examples). I want to implent rotation support (player collision model can rotate). What I obtain : player is stucking in walls.
I know I must add something in the 2nd and 3rd blocks
of code (inside the 1st block).
But I can't really imagine what.
Code :

//End Step Event. Original code from P3DC's examples. Changed a bit for specific use in own game.

arg0=playerCollisionId
arg1=0.25 (arbitrary value)
arg2=6-crouch (Z height of model)
arg3=global.levelCollisionId

var tox,toy;
tox=x
toy=y
x=xprevious
y=yprevious
tdir=point_direction(x,y,tox,toy);
tdist=point_distance(x,y,tox,toy);

if(p3dc_check_rotation(argument0,tox,toy,z-argument2*0.6,argument3,0,0,0,0,0,dir_look)==1){
        if(p3dc_check_rotation(argument0,x+lengthdir_x(argument1,tdir),y,z-argument2*0.6,argument3,0,0,0,0,0,dir_look)==0){
        x+=lengthdir_x(argument1,tdir/*+radtodeg(arctan(p3dc_triangle_data(11)))*/)
        }
        if(p3dc_check_rotation(argument0,x,y+lengthdir_y(argument1,tdir),z-argument2*0.6,argument3,0,0,0,0,0,dir_look)==0){
        y+=lengthdir_y(argument1,tdir/*+radtodeg(arctan(p3dc_triangle_data(11)))*/)
        }
        }else{
    x=tox
    y=toy
    }

Thanks to all, and please help !


Main part of the problem solved (posting if other had the same problem ): the variable representing the x,y,z, rotations must be in RADIANS ! Use degtorad(x) !
  • 0

#329 _239658

_239658

    GMC Member

  • New Member
  • 58 posts

Posted 06 December 2011 - 10:47 PM

i get an unexpected error message when trying to load a d3d model? any help?
i use sketchup and gmmodelfix to do my models
  • 0

#330 brett14

brett14

    GMC Member

  • GMC Member
  • 1150 posts
  • Version:GM8

Posted 16 December 2011 - 07:16 AM

For those encountering errors, I have updated the first post with instructions that seem to work for me. Please report back if they work or not.
  • 0

#331 JurrePs3

JurrePs3

    GMC Member

  • New Member
  • 3 posts
  • Version:GM8

Posted 16 December 2011 - 04:17 PM

For those encountering errors, I have updated the first post with instructions that seem to work for me. Please report back if they work or not.

ok, i have to tell to you and everybody that IT FREAKIN WORKS :D
Thank you so much!!!!

Edited by JurrePs3, 17 December 2011 - 08:55 AM.

  • 0

#332 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 20 December 2011 - 06:01 AM

For those encountering errors, I have updated the first post with instructions that seem to work for me. Please report back if they work or not.


You're welcome :P

Edited by orange451, 20 December 2011 - 06:02 AM.

  • 0

#333 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14390 posts
  • Version:GM:Studio

Posted 20 December 2011 - 08:58 AM

Yeah, that 5112 GMMC 5.0 1.0000 1 1.0000 0.0000 1 1 0 0 0 probably break my gmmodelex code as well as I am using fscanf with %g to read the data, and there is no need to do a read line with that function... In my case it probably blow up trying to read GMMC as a double... or reading the extra values on the line as model points.


I myself added data at the end of the file (texture used and some other bits) I assumed people would use the numlines at the top to guide their loop. Probably not a good idea either.
  • 0

#334 brett14

brett14

    GMC Member

  • GMC Member
  • 1150 posts
  • Version:GM8

Posted 20 December 2011 - 09:05 AM

You're welcome :P

Yes thank you. I did see your example and used it (want credit?). I've never encountered problems myself because I make all my models in such a fashion that these problems don't arise. I have not used gamemaker in several months now, as I am bogged down with school and prefer to work on my engines in C++ (which also contributes to the problem of me not finding bugs).


@Icuurd12b42
I'm doing the same thing (or very similar). It may have been you (pretty sure it was) who helped me read model data a couple years back. Source for my model loading code is posted. I'm using fscanf(...) with %f

Edited by brett14, 20 December 2011 - 09:11 AM.

  • 0

#335 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 20 December 2011 - 10:09 AM

You're welcome :P

Yes thank you. I did see your example and used it (want credit?).


No, no, it's fine :P

I just hope it gets fixed soon, so I don't have to keep changing the second line. I often forget to.
  • 0

#336 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14390 posts
  • Version:GM:Studio

Posted 20 December 2011 - 09:29 PM


You're welcome :P

Yes thank you. I did see your example and used it (want credit?).


No, no, it's fine :P

I just hope it gets fixed soon, so I don't have to keep changing the second line. I often forget to.



Talk to the guy who decided to add non gm model data in the middle of the gm model data of the gm model file. Is it GM Model Creator or something?
  • 0

#337 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 23 December 2011 - 02:00 AM



You're welcome Posted Image

Yes thank you. I did see your example and used it (want credit?).


No, no, it's fine Posted Image

I just hope it gets fixed soon, so I don't have to keep changing the second line. I often forget to.



Talk to the guy who decided to add non gm model data in the middle of the gm model data of the gm model file. Is it GM Model Creator or something?

I don't think Maarten works on that model creator anyomre, I think he only does C++ now.
  • 0

#338 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 23 December 2011 - 09:09 AM

Yes, but I think he actually continues to respond to the Extreme Physics topic... Isn't it ?
  • 0

#339 brett14

brett14

    GMC Member

  • GMC Member
  • 1150 posts
  • Version:GM8

Posted 23 December 2011 - 06:18 PM

Same thing here. I have not used gamemaker in over 6 months, yet I still respond to [some] posts on this. I've been using C++, and have not even used my own dll since V5.00. I have been working on a project for just under a year that many of you will find interesting.
Anyways, please don't get off topic (I realize I just did too). If you wish to contact Maarten do it via PM or some other method. Please don't discuss his forum activity here.

Thanks!
~~Brett14;

Edited by brett14, 23 December 2011 - 06:21 PM.

  • 0

#340 NikaB

NikaB

    GMC Member

  • New Member
  • 111 posts
  • Version:GM8

Posted 23 December 2011 - 09:21 PM

Same thing here. I have not used gamemaker in over 6 months, yet I still respond to [some] posts on this. I've been using C++, and have not even used my own dll since V5.00. I have been working on a project for just under a year that many of you will find interesting.
Anyways, please don't get off topic (I realize I just did too). If you wish to contact Maarten do it via PM or some other method. Please don't discuss his forum activity here.

Thanks!
~~Brett14;

Ok, Sorry ;)
  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users