Game Development Community

getting new getMuzzleTransform from torso twist mod? with video to show problem

by deepscratch · in Torque 3D Professional · 06/23/2014 (5:16 am) · 4 replies

hi all,
I have implemented full torso twising, which works very well, except that the getMuzzleTransform doesn't aim where you look while twisting.
I have included a video to show the issue, perhaps someone has a suggestion on how to fix this?



#1
06/23/2014 (6:53 am)
In theory, you should be able to get the player's transform, subtract the "twist" transform, and then add the difference to the muzzle transform. In practice I'm not certain how to go about this - 3D math isn't my forte....
#2
06/23/2014 (6:55 am)
I will give that a try.
thanks Richard
#3
06/23/2014 (4:16 pm)
well, I hesitate to comment. Richard and Deep are 'way ahead' of me in dev stuff. However, I have to agree with Richard, make your transform '-/+' the 'twist' and you should be good.

(Post note: I tried it on a build of mine and it 'appears to work' though I did not do the exact math.Then again, the 'error' if any, might be calculated/ refined as a perk.)

Ron
#4
06/23/2014 (5:27 pm)
I think it depends entirely on how you implemented twisting. When I was doing this back in TGE I actually found it much easier to twist the legs, rather than the torso. So, Player::mRot still works as usual, but you just add some blended animation to make the feet stay on the ground when you rotate. Much less fuss.