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.jpg]
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
  Standalone Overkill weapons Lyberta 16 19,379 09-03-2021, 11:26 PM
Last Post: BuddyFriendGuy
  Making New Weapons Molnija 22 17,548 02-18-2021, 04:39 PM
Last Post: LegendGuard
  Random start weapons Lyberta 0 2,899 09-23-2017, 09:18 PM
Last Post: Lyberta
  Where can I find the self animated weapons from Nexuiz? MirceaKitsune 14 18,301 11-08-2014, 07:29 PM
Last Post: MirceaKitsune
  CSQC primer/tutorial (for FTEqw) poVoq 0 3,860 12-20-2013, 05:05 PM
Last Post: poVoq
Brick Weapons defined in text files / de-harding weapons [feature debate] MirceaKitsune 41 47,869 10-10-2012, 03:59 PM
Last Post: hutty
  How to make new weapons? Kris 2 5,055 09-30-2012, 08:56 AM
Last Post: Mr. Bougo
Information Alternatives to removing core weapons MirceaKitsune 6 8,545 09-05-2012, 04:43 PM
Last Post: hutty
  Replacing spawn weapons Samual 140 163,260 07-07-2012, 04:57 AM
Last Post: asyyy
  [SOLVED] How does the decompression of files within pk3s work? joshbeck 3 5,591 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-