Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gothic Multiplayer] AimRay intersection with player's camera bbox #202

Closed
Pone4ka opened this issue Mar 8, 2023 · 4 comments
Closed

[Gothic Multiplayer] AimRay intersection with player's camera bbox #202

Pone4ka opened this issue Mar 8, 2023 · 4 comments

Comments

@Pone4ka
Copy link

Pone4ka commented Mar 8, 2023

When Player 2 casts a spell in Player 1 direction I guess the game starts to think that Player 1 cast it, and binds the effect to Player 1's AimVob
https://www.youtube.com/watch?v=mNRk3P-D24k - video demonstration

@szapp
Copy link
Owner

szapp commented Mar 9, 2023

I am surprised to see that you got it working in a multiplayer project. Did this require a lot of adjustments?

Your hunch might be correct. The aiming feature was not implemented with more than one player in mind. A singleton aim-vob is used for aiming and thus is shared if there are multiple players.

To correct this issue, it would be necessary to tie a unique aim-vob to each individual player and it should be identifiable as such.
Additionally, aim-vobs must then be garbage-collected when players leave the server to avoid adding an infinite amount of aim-vobs.

On a technical level, this requires to edit the retrieval of the aim-vob which is fortunately supplied through a centralized function. The logic of the function should be easy to adjust. Furthermore, the creation of the aim-vob must be altered. The only fundamental new thing would be the garbage-collection.

@Pone4ka
Copy link
Author

Pone4ka commented Mar 9, 2023

"Did this require a lot of adjustments?"
Not really, it just works out of box except this trouble with PFX
Scripters from Eskalon online GMP project somehow ajust your masterpiece to work without Union or Ninja, on ingame functions. Now I try to understand how. I'll report if I'll found something.
Guess it's close to impossible to create unic aim-vob for every player inside gothic, because of Gothic dont rather sees difference between two players. GMP tells client who is who.

@szapp
Copy link
Owner

szapp commented Mar 9, 2023

somehow ajust your masterpiece to work without Union or Ninja, on ingame functions. Now I try to understand how.

If the core mechanics work, this should be no hurdle: GFA is a script package. It has nothing to do with Union or Ninja. They are not not required (GFA was even created before either of them).

Guess it's close to impossible to create unic aim-vob for every player inside gothic, because of Gothic dont rather sees difference between two players. GMP tells client who is who.

I assume, at some point, the GMP or client will have to communicate with Gothic to infer who is the player and how to interact with the world. This interface may be necessary there to allow uniquely identifying the aim-vob.

@szapp
Copy link
Owner

szapp commented Oct 15, 2023

Close stale issue

@szapp szapp closed this as completed Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants