GoldenEye: Source Forums

Editing and Customization => Modding Help => Topic started by: Joe on July 07, 2013, 11:14:28 am

Title: Is there a way for mode scripts to calculate a trace ray's contact vector?
Post by: Joe on July 07, 2013, 11:14:28 am
Hi,

I would like to know this so that I can make DAD mode's (http://forums.geshl2.com/index.php/topic,7378.0.html) script draw resurrection beams from players to the point on a gravestone where they are aiming the beam at, instead of just making the beam be drawn to the gravestone's origin.

I've tried to work out a calculation for this but I haven't been successful. I would bet though, that there is a way to calculate this with the data available to mode scripts.

Available data which I think could be useful for this calculation:
Title: Re: Is there a way for mode scripts to calculate a trace ray's contact vector?
Post by: killermonkey on July 07, 2013, 12:27:08 pm
One problem with this is that as you move the beam it will have to destroy the original one and recreate a new one. This would create a significant network overhead. Although not too terrible, just something to consider.

My suggestion would be to create a random "attachment point" when you first create the beam that is something other than the origin of the grave stone.

It might just be easiest to +15 in the Z direction of the gravestone's origin to start with.
Title: Re: Is there a way for mode scripts to calculate a trace ray's contact vector?
Post by: Joe on July 08, 2013, 12:35:52 pm
Thanks for helping me Killer Monkey.

One problem with this is that as you move the beam it will have to destroy the original one and recreate a new one. This would create a significant network overhead. Although not too terrible, just something to consider.

If this would create a significant network overhead then I will just make the beam go from a player's aim direction vector to the center of the gravestone they are aiming at.

When a player is able to use two or more gravestones at the same time with the LRR ability, I will make this mode's script draw multiple beams from the player's aim direction vector to the gravestones they are using.