|
Post by Lukas W on Aug 25, 2005 17:25:36 GMT 1
i simply desided to rewrite the ai. now what i need help with is this: how would i rotate a rigid body?? (like Rotate Object id, x, y, z). 'Rotate object' command does not work it looks like.. it rotates the dbpro object and not the rigid body...
|
|
|
Post by Lukas W on Aug 25, 2005 17:28:53 GMT 1
crap i just made a search on these forums and i found this: (copied from 'question for walaber')
NDB_BuildMatrix 20.0, 45.0, 0.0, 100.0, 100.0, 10.0 NDB_NewtonBodySetMatrix missile
i think i know what to do now:P thanks anyway:)
|
|
|
Post by Lukas W on Aug 25, 2005 17:54:24 GMT 1
<edited by Lukas W: problem solved>
|
|
|
Post by Lukas W on Aug 29, 2005 13:19:35 GMT 1
<edited by Lukas W: problem solved>
|
|
|
Post by me er yea me on Sept 11, 2005 11:02:37 GMT 1
wow ... dude , i wish you good luck you seem to explore a part no one been through yet gl !
|
|
|
Post by Lukas W on Sept 30, 2005 6:57:46 GMT 1
allrighty, i finnally got it fixed. the problem was: i didn't have a "NDB_NewtonBodySetAutoFreeze zBody, 0" in my code my next problem is this: newton and dbpro seems to have different numbers on their angle Y axis. in dbpro the yangle goes like this: 0..90..180..270 in newton the same angle, on the same object go like this: 0..90..-0..-90 so when i want my zombie to follow the player, i: * get current rotation of zombie * point visual object towards player * get new rotation * rotate visual object back to normal * inc zBody Yangle by 1 or dec by 1 until zbody Yangle = New Y Angle. but this does not work as well as i was hoping: if New Y Angle = 270 then the rigid body dont know that 270 means -90. so what should i do?
|
|
|
Post by Kjelle69 on Sept 30, 2005 15:39:51 GMT 1
have a look at "shichinin no himesama" from my website. it's my old game for the TGC compo. it has control of primitives by forces and torques, which i think is what you're looking for. the full source code is included, and probably a bit difficult to follow, but look at the code that animates the enemys, it does what you're looking for.
|
|
|
Post by Lukas W on Sept 30, 2005 17:48:32 GMT 1
thank you, i will have a look at the source.
|
|
|
Post by omnxae on Aug 22, 2008 6:58:18 GMT 1
|
|