Create an account


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

#1
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)
Code:
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!!
Reply

#2
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: https://gitlab.com/xonotic/xonotic/wikis/Weaponsystem
[Image: 230.png]
Reply

#3
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
Reply

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

Thanks anyway
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Making New Weapons Molnija 28 3,427 01-27-2019, 04:04 PM
Last Post: 3agle427
  Standalone Overkill weapons Lyberta 30 6,436 07-11-2018, 09:31 AM
Last Post: Lyberta
  Random start weapons Lyberta 0 1,180 09-23-2017, 09:18 PM
Last Post: Lyberta
  Where can I find the self animated weapons from Nexuiz? MirceaKitsune 14 9,790 11-08-2014, 07:29 PM
Last Post: MirceaKitsune
  CSQC primer/tutorial (for FTEqw) poVoq 0 2,315 12-20-2013, 05:05 PM
Last Post: poVoq
Brick Weapons defined in text files / de-harding weapons [feature debate] MirceaKitsune 41 26,491 10-10-2012, 03:59 PM
Last Post: hutty
  How to make new weapons? Kris 2 2,920 09-30-2012, 08:56 AM
Last Post: Mr. Bougo
Information Alternatives to removing core weapons MirceaKitsune 6 4,651 09-05-2012, 04:43 PM
Last Post: hutty
  Replacing spawn weapons Samual 140 100,346 07-07-2012, 04:57 AM
Last Post: asyyy
  [SOLVED] How does the decompression of files within pk3s work? joshbeck 3 3,431 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-