Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Orienting weapons to bones (CSQC)

Hi guys! I'm trying to attach a weapon (normal model without bones) to a CSQC player skeleton with this code (in player predraw function)
setorigin(rifle,gettaginfo(self, weapon_r));

The weapon is attached correctly, but orientation follows mouse input. I'd like that it'd stay oriented to weapon bone.
Is it possible? I asked at guys at inside3d but no one knows how to do it

Please don't tell me to look at Xonotic code: I did it but I cannot understand a thing!Tongue

Thanks in advance guys!!

Regular weapons use a h_ model (h_electro.iqm for example) to handle bones, copying one of these to use with your static v_ mesh should work fine, no need to modify code.

A full guide on the process is available here:
[Image: 230.png]

Thanks a lot Mario, but I forgot to tell that I'm not creating a mod for Xonotic but a complete standalone project and I asked here because maybe some Xonotic dev could help me a bit

Thanks anyway though!Wink

Solved on inside3d, thanks to Spike
for those interested, go here.

Thanks anyway

Possibly Related Threads…
Thread Author Replies Views Last Post
  Standalone Overkill weapons Lyberta 16 18,257 09-03-2021, 11:26 PM
Last Post: BuddyFriendGuy
  Making New Weapons Molnija 22 16,104 02-18-2021, 04:39 PM
Last Post: LegendGuard
  Random start weapons Lyberta 0 2,744 09-23-2017, 09:18 PM
Last Post: Lyberta
  Where can I find the self animated weapons from Nexuiz? MirceaKitsune 14 17,084 11-08-2014, 07:29 PM
Last Post: MirceaKitsune
  CSQC primer/tutorial (for FTEqw) poVoq 0 3,691 12-20-2013, 05:05 PM
Last Post: poVoq
Brick Weapons defined in text files / de-harding weapons [feature debate] MirceaKitsune 41 45,264 10-10-2012, 03:59 PM
Last Post: hutty
  How to make new weapons? Kris 2 4,833 09-30-2012, 08:56 AM
Last Post: Mr. Bougo
Information Alternatives to removing core weapons MirceaKitsune 6 8,060 09-05-2012, 04:43 PM
Last Post: hutty
  Replacing spawn weapons Samual 140 155,004 07-07-2012, 04:57 AM
Last Post: asyyy
  [SOLVED] How does the decompression of files within pk3s work? joshbeck 3 5,295 09-29-2011, 09:28 PM
Last Post: joshbeck

Forum Jump:

Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-