Jump to content

GeNa Pro / Rail Shooter bug


ant

Recommended Posts

Hey. I posted this to Discord, but now I have forum access but I've been playing around with the Rail Shooter Template, and I seem to have a weird bug where the shooting mechanism just stops working depending on your location. I'm just wondering if anyone has come across this before and / or might know what's causing it? 

Sorry if this isn't the right place to ask, I couldn't find anywhere more appropriate to post this, and don't have access to the rail shooter forum

So, here's a video of it happening, and I'll try to explain as best as I can.

https://www.youtube.com/watch?v=hkuQTvxWQGg

If you watch carefully, you'll see that after a few seconds, the projectiles stop, even though the sfx plays. Debugging and walking through the code in VS shows all the functions firing as normal (I've also littered the code with debug statements and there is no difference in the output between when it works and when it doesn't). There are no errors in the console, either. 

I've tried in a completely new, blank project with only GeNa Pro and the template added. I thought it was related to Splines at one point, but that wasn't the case. It seems to be dependent on the player position. 

So, in the above example video, the starting point for the game manager prefab is (X,Y,Z) 0, 378, 0, and it fires up until (roughly) you've moved around 800 - 850 along the Z axis. But, if I move the starting location back into the negative (along the Z), going back further than -950 and it "breaks" again. And it's not just along the one axis, either, it's pretty much anywhere. There seem to be little pockets of "space" in which it functions correctly, but then everywhere else, it doesn't. 

I can't replicate it in the Gaia Complete demo scene, but the basic demo scene it definitely still happens if you fly too far away from the spawners. 

Unity - 2021.3.20
GeNa Pro - Version 3.5.0 
Rail Shooter Template - Version 1.0.1

Does anyone have any idea what might be happening?

Link to comment
Share on other sites

Hi @ant, thanks for the detailed report on the issue! With the help of your description and the video I looked into the issue and I think I found out what is going on: The laser objects have a max distance that they are allowed to travel until they are removed again - makes sense to not flood the scene with unlimited lasers that travel forever.
However those lasers are also pooled - means the same laser beams are recycled over and over again since this is more performant than creating new game objects all the time. 
The problem was that the lasers get assigned a start position on their initial creation to track how far it traveled, but it is not updated anymore when the laser is recycled. Eventually you would travel so far in the scene, that the laser was immediately "Out of Bounds" because it would still calculate the travel distance based on that old, outdated starting point.
I made a small patch that should fix the issue, it now updates the starting position whenever a laser is recycled. Please install this unitypackage via Assets > Import Package > Custom Package into your project. We will add this fix to the next update for the asset.

 

RailShooterLaserPatch.zip

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...