|
Simple drop-to-ground
#182395
02/06/08 17:05
02/06/08 17:05
|
Joined: Aug 2005
Posts: 390 Florida
oldschoolj
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 390
Florida
|
Hi folks,
I need a simple bit of code that will drop an entity to the ground, and match the angle of the slope it hits. This code can't use any skills, must be resource friendly, and I need to be able to place it in pre-existing actions, etc.
Any help would be greatly appreciated!
thanks
you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe.
__________________________________
yours truly
|
|
|
Re: Simple drop-to-ground
[Re: kasimir]
#182397
02/06/08 17:20
02/06/08 17:20
|
Joined: Aug 2005
Posts: 390 Florida
oldschoolj
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 390
Florida
|
yes it does, but if ignore_models is set, wouldnt it pass through the terrain?
you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe.
__________________________________
yours truly
|
|
|
Re: Simple drop-to-ground
[Re: kasimir]
#182399
02/07/08 05:11
02/07/08 05:11
|
Joined: Apr 2005
Posts: 3,815 Finland
Inestical
Rabbit Developer
|
Rabbit Developer
Joined: Apr 2005
Posts: 3,815
Finland
|
terrains are separate from models. so you'd have to use ignore_terrain to make it go trough terrain.
"Yesterday was once today's tomorrow."
|
|
|
Re: Simple drop-to-ground
[Re: Inestical]
#182400
02/07/08 07:06
02/07/08 07:06
|
Joined: Aug 2005
Posts: 390 Florida
oldschoolj
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 390
Florida
|
ya, im sorry what i meant is my terrains are models, heh.
you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe.
__________________________________
yours truly
|
|
|
Re: Simple drop-to-ground
[Re: oldschoolj]
#182401
02/07/08 07:43
02/07/08 07:43
|
Joined: Aug 2005
Posts: 390 Florida
oldschoolj
OP
Senior Member
|
OP
Senior Member
Joined: Aug 2005
Posts: 390
Florida
|
vec_set(ground_vec,vector(my.x,my.y,my.z + my.min_z)); vec_set(target,vector(my.x,my.y,my.z - 5000)); my.z -= c_trace(ground_vec,target, IGNORE_ME | IGNORE_PASSABLE) -1; my.tilt = -asin(normal.x); my.roll = -asin(normal.y);
thats what ended up working for me, based off of your post, thanks for the help.
you can find me with my face in the keyboard, unshaven, listening to some nameless techno tragedy, and hashing through code over a cold cup a stale joe.
__________________________________
yours truly
|
|
|
|