GoldenEye: Source Forums

  • November 21, 2024, 05:55:16 pm
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Is there a way for mode scripts to calculate a trace ray's contact vector?  (Read 9102 times)

0 Members and 1 Guest are viewing this topic.

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline

Hi,

I would like to know this so that I can make DAD mode's 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:
  • A vector pointing in the direction of a "long range resurrection ability" user's aim direction.
  • This ability's maximum range.
  • The user's origin vector.
  • The user's rotation vector.
  • The gravestone's (capture area object's) origin vector.
  • The gravestone's rotation vector.
  • The size and shape of the gravestone's entity area box.
« Last Edit: July 08, 2013, 12:50:07 pm by Joe »
Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps

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.
Logged

Joe

  • Secret Agent
  • **
  • Posts: 139
  • Reputation Power: 54
  • Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.Joe has an aura about them.
  • Offline Offline

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.
« Last Edit: July 08, 2013, 12:48:51 pm by Joe »
Logged
Free games:FPS + RTS: Renegade X & Battlezone 1.5,RTS: 7 Kingdoms & Open Red Alert, TBS:Hedgewars, playcatan.com & www.wesnoth.org
Pages: [1]   Go Up