Page 1 of 1

collision entity problem

Posted: Thu Jul 03, 2003 6:01 pm
by jrod2032
hey all

i just joined this forum not too long ago and i've got a problem
i posted this same one in Nemesis' forum, but id like to see if any of you can help me :P

all i've been trying to do is set a collision entity, and it never will work. right now the closest i've gotten is the vehicle sitting on top of the collision mask, which is half-buried in the ground.

what i WANT to do is make a truck drive with the collision working like its supposed to, moving along with the truck

i started off using the SDK as a guide to make my truck's collision and setting it to the truck

NOTE: i use the old radiant, i just downloaded the SDK to get the tutorials and then deleted it

then i looked at other scripts and tried slapping some 'setcollisionentity' commands and whatnot on there

and, out of despiration, i tried the SDK tutorial once more, and lo and behold it still work work

this is pestering the crap outta me

what ive done is place a truck with the targetname $truck, make a collision of that truck (with the truck having the angle value of 0) and named it $truck_collision, i made the collision a script_object and i targeted $truck to $truck_collision

here are some pictures of what i have:

Image
ok, here's my truck and its collision

Image
and here's what it looks like in the 3D window (note that there's a floor separating the two, its just not visible)

i don't know if this will help, but when this is compiled, what the collision does is move along with the truck, but it is only halfway sticking out of the ground

and also i put 4 friendly AI in the map (dont ask, i just felt like it :D) and when the truck stops, they turn hyperactive on me and start having spasms, sorry that's the best way i can put it, and when you get close to the truck, sometimes everything jitters like there is a small earthquake

please someone help me!
thanks

Posted: Thu Jul 03, 2003 6:40 pm
by Alcoholic
havent you read the tank tutorial at mohaa in a bagel? the collision entity always goes halfway in the ground. you have to create an extra brush that doubles the height.

Image

Posted: Thu Jul 03, 2003 6:47 pm
by jv_map
More correctly you have to redefine the center of the collisionent. The origin of the truck is at the bottom, and the game code makes it so the collisionent's origin is glued to the vehicles origin, so normally the collisionent is glued too low.

To fix this you need to make an origin brush (i.e. brush with common/origin texture) for your collisionent at its bottom (at the same relative position as where the arrow of the truck models comes from). That should fix it :).

Posted: Thu Jul 03, 2003 6:49 pm
by Alcoholic
bah, my way works too. :mrgreen:

Posted: Thu Jul 03, 2003 6:51 pm
by jv_map
Alcoholic wrote:bah, my way works too. :mrgreen:
Sure, since it makes the origin of the collisionent move down.

Posted: Thu Jul 03, 2003 7:01 pm
by Alcoholic
yep.

Posted: Thu Jul 03, 2003 8:27 pm
by jrod2032
gee, thanks fellas
that was pretty fast

now it works perfectly

in response to Alcoholic's first post:

i think i read the tutorial from MOHAA in a bagel, but i forgot all about it when i made this map :roll:

thanks again!