Game Development Community

mounting weapon in first person to hands not eye node ?

by x-ming-x · in Torque 3D Professional · 02/20/2011 (4:19 pm) · 3 replies

Hello :)

im trying to stop the weapon moving from the hand node (mount0) to the eye node (or position of eye node)
when i toggle the camera to first person. ive poked around in shapebaseimage but the changes ive made around the "isfirstperson" code seem to have no effect.

any help much appreciated

About the author

ive been making games since they used to be on floppy discs, ive been all over the industry and worked for / with all types of companies, big and small. Now im lucky enough to be indie and working full time for myself and my team :)


#1
02/20/2011 (4:29 pm)
In art/yourWeapon.cs file there is an offset and eyeoffset value in shapeBaseImage function (with the firing/reloading FSM). If you disable them (just comment them out), the weapon will mount at mount0 with no offsets.
#2
02/20/2011 (8:04 pm)
hi Steve

thanks for helping me out, i tried your suggestion and umm eek

it didnt work for my project so then i tried it on a clean install and it did work. im using the 3daak and it seems that with the addon its overiding the original functionality and putting the gun there anyway.

ill look further into it, do you have the 3daak ?

cheers dude :)
#3
02/20/2011 (8:24 pm)
yeh found it a missing bit in player.cpp
so if anyones using 3daak and getting weapon mount weirdness

in Player::renderMountedImage

change
if ( !rstate.getSceneState()->isShadowPass() && isFirstPerson() )

to

if ( !rstate.getSceneState()->isShadowPass() && isFirstPerson() && data.useEyeOffset )

works as far as i can see but lets see what bugs that makes :P