Weapon don't work properly in packaged game
Explaining my code: i have 4 weapons that inherits from a "Weapon" parent class: Shotgun, Lasergun, GranadeLauncher and Rifle, every one of them shot a different Projectile that inherits from a "Projectile" parent class, the player starts only with the laser gun, when it hits a given hitbox it will have a shotgun, the player character have an array of weapons (class) with all the avalliable weapons he have, at this point he would have Shotgun and Lasergun avalliable, every time the player presses 'e' it spawns the next weapon in the array (and destroy the one he is using). i could just show the code, but it would be long, and in theory it's working, since it works in editor and also works for every other gun, except this one. what happens in packaged game for win64: apparently spawns an instance of the shotgun class, i say it because there's an icon in the left showing what gun the player is helding, and it shows the shotgun icon, plus it shoots, the projectile actually spawns and can even cause damage as expected, but it goes in a really weird direction - i've also packaged to linux, but still couldn't test if it also happens there since i'm having troubles finding someone with openGL 4.3 or later, i've tried to compile mesa from git but got stucked in the llvm - the lasergun and the granade launcher spawns properly, the rifle isn't avalliable to the player in the actual version of the game, in theory he would get it in a next level that isn't done yet so i couldn't test it.
my theory is that this is a problem related to the socket, maybe it spawns with a different rotation location or scale, what would make this happens, but the socket seems to be fine, since it works in viewport. another theory would be the fact that this mesh has no UV map at this point, but it is used as static mesh for "decoration" in some parts of the game, and it's visible there, and plus it wouldn't explain the fact that the projectile spawns in a weird direction.
the game was packaged under "DebugGame" and with inclusive nativization i'm also uploading a log, find nothing relevant in it, just some fails from "AIMoveTo" (but it seemed to work fine in game) and some access to wrong index of an array (caused by nativization maybe?): Log
asked Feb 27 '17 at 06:10 PM in Packaging & Deployment
i just repackaged the game and the weapon worked again, this time i repackaged to "shipping" and with nativization disabled, also there was some minor bugs in this bugged version beyond the invisible weapon: the projectile from lasergun was too "thin", the new version and the editor don't have this problem, also i've spread some box around the map (to simulate cars, and make the ai take different routes to the player) the boxes where a little bit smaller in the "bugged" version. don't make sense to me that all of this was caused by nativization, i will come back if i have more info.
answered Mar 02 '17 at 02:50 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here