|
Post by IsmAvatar on Feb 11, 2005 22:44:33 GMT -5
There are numerous kinematics and cinematic equations available for 2d games, but when 3d was implemented, it wasn't supported quite as user-friendly. So, its been left up to use trigonometrists to calculate everything we need on the go, and anyone who didn't know trig was left finding their own case-specific formula or asking someone to make one for them, or (mose likely) some quick unprofessional fix. Not to worry, one of those trigonometrists has finally opened up the doors and closed the gap, enabling those of us who haven't taken precalculous in school yet, to be able to make 3d games. userweb.nni.com/cmagicj/d3d_formulas.gml(r-click and save target as, so it doesn't open as a text file) function: d3d_motion_add(dir,pitch,speed) counterpart: motion_add(dir,speed) function: d3d_angle_x/y/z(dist,[dir,]pitch) counterpart: lenthdir_x/y(dist,dir) function: point_pitch(x1,y1,z1,x2,y2,z2) counterpart: point_direction(x1,y1,x2,y2) function: d3d_move_towards(x,y,z,speed) counterpart: move_towards_point(x,y,speed) function: d3d_point_distance(x1,y1,z1,x2,y2,z2) counterpart: point_distance(x1,y1,x2,y2) If I missed one, please point it out. I'd be more than happy to make a d3d function for it. Also, these functions do not account for Tilt (or Roll). I have found this 3rd angular variable difficult to handle, but with my new education (of the distance formula), I should be able to handle any requests for it.
|
|
|
Post by Another Gamer on Feb 12, 2005 6:16:38 GMT -5
You've been busy lol. Link doesn't work btw.
|
|
|
Post by IsmAvatar on Feb 12, 2005 15:08:19 GMT -5
Try it again. Too many math words that begin with F...
|
|
|
Post by Another Gamer on Feb 13, 2005 16:47:45 GMT -5
All I get from most of your scripts are mundo errors.
Also, your formula to get the pitch always returns an improbabal number, and so I was forced to create my own, and here it is =D
Script name is get_pitch
I tested it over and over, and it works perfectly for me, I was so happy too. Had help from me mom though =)#nosmileys#nosmileys
|
|
|
Post by IsmAvatar on Feb 14, 2005 19:56:45 GMT -5
For some reason, GM is interpreting the commented lines of some of the codes. I have no idea why, and have no clue how I could possibly fix it.
|
|
|
Post by Another Gamer on Feb 15, 2005 6:26:19 GMT -5
ACtually if you look at it, the error says something like line 1, position 215. I found that odd, but you can easily work around that. The position is the position of the error, added on with the position of all the other lines put together.
|
|
|
Post by IsmAvatar on Feb 15, 2005 12:57:29 GMT -5
I know how to calculate it out, i've been using GM for ages...
I also know that you can debug scripts by clicking on the 1010 button up top. When I click on this, some of the scripts will give an error on the commented lines.
Also, make sure you are going to SCRIPTS | IMPLEMENT SCRIPTS, and not just copy and pasting the entire thing into a single script.
I will try to figure out how to work out the kinks. One thing I did notice is that for a few of the scripts I used variables instead of arguments, so i'll have to modify that. I can only hope I fix something correctly so that it will stop producing errors in the commented lines...
|
|
|
Post by IsmAvatar on Feb 17, 2005 16:25:04 GMT -5
I have fixed the kinks that I know of. Please re-download it (same link). If there are any further issues, please tell me. Thanks.
|
|