Collision detection only working at origin

Posted By: Chameleon_Man

Collision detection only working at origin - 07/28/06 06:07

Hey guys, Im using c_move and c_trace, and my collision detection for gravity doesn't work. The player sinks into the ground until it hits the origin of the players coordinates. What could be the problem?
Posted By: Xarthor

Re: Collision detection only working at origin - 07/28/06 09:27

If you don't post some code we cannot help you.
I guess there is a problem with the c_trace however I'd like to see the gravity part of your script.
So please post it here and we might be able to help you.
Posted By: Grimber

Re: Collision detection only working at origin - 07/28/06 09:37

my first guess is your using USE_BOX in the trace code mode, which doesn't work the same how it did with the older trace

you will ahve to trace from the min_z down or subtract the origin.z to min_z distance from result of the trace to get the similar result
Posted By: EpsiloN

Re: Collision detection only working at origin - 07/28/06 10:21

Usualy what I do (I'm not using min_z,dunno why ) is look at the possition of my model in WED(the parameters in the properties window) and then point with the mouse at his feet,this gives me the distance from the origin to the end of the model,and then in the trace I dont trace from my.z but from my.z - the value that I calculated between the .z and the end of the model. And also with use_box
Posted By: Chameleon_Man

Re: Collision detection only working at origin - 07/28/06 15:10

Thanks for the help guys. Here's my code...

c_move(me,vector(4*(key_cuu-key_cud),4*(key_cul-key_cur),0),vector(0,0,-1),GLIDE || IGNORE_MODELS || USE_BOX);

I fixed the problem. That's quite interesting USE_BOX isn't the same since the last update, because now that I think of it, that's when I really started having the problem.
© 2024 lite-C Forums