RimWorld

RimWorld

184 ratings
Better Projectile Origin
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
178.550 KB
Jul 31, 2022 @ 12:33pm
Jun 20 @ 2:01pm
5 Change Notes ( view )

Subscribe to download
Better Projectile Origin

In 1 collection by Mlie
Developed by me
110 items
Description


Okay, so this mod may be a bit unnecessary but the idea got stuck in my head so I made it mostly to see if it was possible.
If you find it useful I suggest you look into the Gunplay-mod if you want more features.

In the vanilla game all projectiles shot by pawns originates from the center of the pawn, not from the weapon they are holding. The game dont know where on a weapon the projectile "should" spawn as the weapons are just textures. Ordinarily this is probably close enough but when using mods like Camera+ however, it can look a bit wierd when zoomed in.

So this mod scans all weapons at game-start, finds the last non-transparent pixel in their texture, assuming that is where the projectile should spawn. It then modifies the start-point for projectile to that spot instead of at the center of the pawn. Should work when using the Dual Wield mod as well.

Technically this will affect the combat ever so slightly, since the projectile path will be shorter depending on the length of the weapon. I dont think this will have any noticable impact however, but report if you see anything strange.

Hopefully someone will find this mod useful!

Thank you to the Projectile Offset Framework by Profilgate that put the idea in my head from the start.

[discord.gg]
[github.com]


Since modding is just a hobby for me I expect no donations to keep modding. If you still want to show your support you can gift me anything from my Wishlist or buy me a cup of tea.

[ko-fi.com]


  • See if the the error persists if you just have this mod and its requirements active.
  • If not, try adding your other mods until it happens again.
  • Post your error-log using the Log Uploader and command Ctrl+F12
  • For best support, please use the Discord-channel for error-reporting.
  • Do not report errors by making a discussion-thread, I get no notification of that.
  • If you have the solution for a problem, please post it to the GitHub repository.
  • Use RimSort[github.com] to sort your mods

| tags: realism
61 Comments
lucky_one 🍀 Aug 8 @ 3:27am 
I just tested it with this mod alone and it still happens. Here is the I recorded earlier:

https://cdn.steamusercontent.com/ugc/15093664409934984501/F259FDC3A10B6066ED4988A8DD712CF4F7AEE39C/
lucky_one 🍀 Aug 7 @ 6:48pm 
Hi Mlie! I found a weird and interesting bug that I’ve traced back to this mod.

When you have multiple pawns selected and drag them to move to another location (so you see the “ghost” of the pawn in that position), if they are firing, the shot will come from the ghost’s position instead of the actual pawn.

This isn’t just a visual glitch, the projectile actually originates from the ghost. So if you drag the ghosts around while the pawns are firing, you can position them behind an enemy, pawn, or object, and the shot might hit it from there.

If my explanation isn’t clear (it’s easy to test), I can post a clip here or on the Discord.
Eclipse Aug 3 @ 7:00am 
What about turrets?
LoggerC4 Jul 8 @ 11:01am 
This has been a must-have,.thank you for the 1.6 update! :RelicII:
I know you're incredibly busy, but after other priorities, is there any possibility this same origin logic can be applied to turrets? It's especially noticeable with autocannon and chargeblaster turrets to see the bullets coming from the very center instead of their barrels
Mlie  [author] May 14 @ 12:59pm 
@[Brooker] Please see the Reporting Issues section described above
[Brooker] May 14 @ 11:47am 
Having the same issue as Toyo
Toyo Apr 26 @ 4:13am 
Have an issue where bullets fly across the map and hitting a random wall. This happens when the gun is fired offscreen
MrSmith Apr 20 @ 7:19am 
Since 1.5 mod causes issues with pawns unable to fire their weapon and firing animation not showing. could also be an issue with my extensive modlist
just a heads up if anyone in the future faces the same issue
Farbott Jan 12 @ 9:37am 
Dont know how possible it'd be, but I think a lot of issues could be fixed if this had a menu like show me your hands, so you can set exactly where the bullet comes out of!
R A I D E N Jan 7 @ 10:52am 
combat extendat compatibility pleaseee!