Black Star Posted April 27, 2023 I coded this Plasma Rifle replacement that uses the function A_WeaponProjectile. It works just fine most of the time, except for the fact that it fires its projectiles slightly off center all the time. Offsets are centered and everything, I have no values assigned to the projectile call function, meaning no angle/spread/etc is present. Trying to shoot an enemy that's to my left or right sends the projectiles a bit too far in that direction sometimes, but especially so when autoaiming upwards (sometimes missing enemies entirely). Tested with Odamex and Doom Retro, both ports exhibit the same behaviour. I've even checked against Xaser's Vesper (which uses the same function) and every projectile that calls the function is perfectly centered even with autoaim, despite the fact I am using the same exact function with the same parameters. I feel like it's gaslighting me and I'm not a fan of it, haha. Any help is appreciated. 0 Quote Share this post Link to post
Trov Posted May 2, 2023 Silly thought, are the sprites aligned? Most of the stock doom weapon HUD sprites are fairly off center towards the right. 0 Quote Share this post Link to post
ViolentBeetle Posted May 2, 2023 I had a weird problem that sounds like that with a monster projectile, I still have no idea why. Have you written it from scratch or did you inherit it? I didn't inherit it and projectile spawned off, to this day I'm not sure why. 0 Quote Share this post Link to post
Black Star Posted May 2, 2023 15 hours ago, Tarvis said: Silly thought, are the sprites aligned? Most of the stock doom weapon HUD sprites are fairly off center towards the right. Oh yeah. In fact, I even did the same alignments as the vanilla plasma on both the weapon itself and the projectile (that's the weapon it replaces). Same thing. 5 hours ago, ViolentBeetle said: I had a weird problem that sounds like that with a monster projectile, I still have no idea why. Have you written it from scratch or did you inherit it? I didn't inherit it and projectile spawned off, to this day I'm not sure why. The first iteration of it was done from scratch, then I inherited from the plasma ball (since it replaces the plasma rifle). Nothing. 0 Quote Share this post Link to post
Trov Posted May 2, 2023 (edited) 4 hours ago, Black Star said: Oh yeah. In fact, I even did the same alignments as the vanilla plasma on both the weapon itself and the projectile (that's the weapon it replaces). Same thing. Well, the vanilla plasma rifle is misaligned, so that might not be the way to go. Edited May 2, 2023 by Tarvis 0 Quote Share this post Link to post
ETTiNGRiNDER Posted May 2, 2023 How fast is the projectile? I seem to recall from back in the day, with DeHackEd at least, if you gave a projectile higher than a certain speed it would start aiming strangely. 1 Quote Share this post Link to post
Black Star Posted May 2, 2023 2 hours ago, ETTiNGRiNDER said: How fast is the projectile? I seem to recall from back in the day, with DeHackEd at least, if you gave a projectile higher than a certain speed it would start aiming strangely. 40. 2 hours ago, Tarvis said: Well, the vanilla plasma rifle is misaligned, so that might not be the way to go. I've tried all sorts. A little off to the left, to the right, up, down... 0 Quote Share this post Link to post
Aurelius Posted May 3, 2023 As mentioned by ETTiNGRiNDER, your projectile speed is too fast, which causes wonky behavior. A good rule of thumb is that the projectile speed should not be faster than twice its radius. You can get away with deviating from this rule (mostly by reducing the radius, not by increasing speed), but it's mostly trial and error to find a good balance. Personally, I've never used a projectile faster than 32. 1 Quote Share this post Link to post
Black Star Posted May 4, 2023 That was indeed the culprit. ZDoom has a similar caveat with the projectile speed but I didn't know vanilla had a more restrictive one, thank you. 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.