Precise 3D Collisions Dll (P3DC.dll) V6.1
#321
Posted 15 October 2011 - 10:25 PM
#322
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 !!!!
#323
Posted 08 November 2011 - 03:21 AM
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);
}
#324
Posted 12 November 2011 - 06:00 PM
#325
Posted 21 November 2011 - 07:28 AM
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
#326
Posted 02 December 2011 - 10:00 PM
-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.
#327
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
#328
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) !
#329
Posted 06 December 2011 - 10:47 PM
i use sketchup and gmmodelfix to do my models
#330
Posted 16 December 2011 - 07:16 AM
#331
Posted 16 December 2011 - 04:17 PM
ok, i have to tell to you and everybody that IT FREAKIN WORKS :DFor 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.
Thank you so much!!!!
Edited by JurrePs3, 17 December 2011 - 08:55 AM.
#332
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
Edited by orange451, 20 December 2011 - 06:02 AM.
#333
Posted 20 December 2011 - 08:58 AM
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.
#334
Posted 20 December 2011 - 09:05 AM
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).You're welcome
@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.
#335
Posted 20 December 2011 - 10:09 AM
Yes thank you. I did see your example and used it (want credit?).You're welcome
No, no, it's fine
I just hope it gets fixed soon, so I don't have to keep changing the second line. I often forget to.
#336
Posted 20 December 2011 - 09:29 PM
Yes thank you. I did see your example and used it (want credit?).You're welcome
No, no, it's fine
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?
#337
Posted 23 December 2011 - 02:00 AM
I don't think Maarten works on that model creator anyomre, I think he only does C++ now.
Yes thank you. I did see your example and used it (want credit?).You're welcome
No, no, it's fine
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?
#338
Posted 23 December 2011 - 09:09 AM
#339
Posted 23 December 2011 - 06:18 PM
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.
#340
Posted 23 December 2011 - 09:21 PM
Ok, SorrySame 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;
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









