shoiko Posted December 22, 2015 Share Posted December 22, 2015 So, i'm trying to replace the player arms and weapon model in first-person. I've made a new player_arms.dae file with the arms rigged to my skeleton, plus a player_pistol.dae containing the weapon attached to the hand bone, and no arms mesh. Finally, there's a few DAE files with the animations: idle, fire, etc. Everything works fine: the states, the animations, except for one thing: the model is rendered in a completely wrong position:http://imgur.com/VxWfenkThat's me, in FP camera, looking down. That mesh over there is the player arms. I'm rendering in wireframe because they're below the ground. It seems to be rotated about 180 in the Z axis. Or something like that. My skeleton, the mesh and all the animations are correctly set up in the Y-Front, Z-Up orientation. And the scale is based on the original Torque player model. Any ideas of what i might be doing wrong here? Quote Link to comment Share on other sites More sharing options...
Duion Posted December 22, 2015 Share Posted December 22, 2015 First person arms must face the positive y-axis and be located at the center of the coordinate system. Quote Link to comment Share on other sites More sharing options...
saindd Posted December 22, 2015 Share Posted December 22, 2015 "My skeleton, the mesh and all the animations are correctly set up in the Y-Front, Z-Up orientation."So, yes, the arms, the weapon and the skeleton are all facing the positive Y, having Z up and are located at the center. By the way, being at the center shouldn't really matter for anything, since the FP camera is translated to the eye node in the player model.@shoiko, you are probably not setting useEyeNode in your datablocks. Try that out.http://docs.garagegames.com/torque-3d/reference/classShapeBaseImageData.html#ac398de7e09bdd5c0713af499ae56508chttps://github.com/GarageGames/Torque3D/blob/2044b2691e1a29fa65d1bdd163f0d834995433ce/Engine/source/T3D/player.cpp#L5393 Quote Link to comment Share on other sites More sharing options...
Duion Posted December 22, 2015 Share Posted December 22, 2015 They have to be at the center, that is most important, since that is where the model gets mounted on, you can also define an extra mountpoint, but center is easier.You also need to reset transformations and rotations, in case you have something applied. Quote Link to comment Share on other sites More sharing options...
saindd Posted December 22, 2015 Share Posted December 22, 2015 FP images are not mounted. You're confusing third-person world models with first-person. Quote Link to comment Share on other sites More sharing options...
Duion Posted December 22, 2015 Share Posted December 22, 2015 Of course they are, at the center of the coordinates system or a mountpoint. Quote Link to comment Share on other sites More sharing options...
saindd Posted December 22, 2015 Share Posted December 22, 2015 Mount points are used for third-person world view. shapeName is mounted on mountX and shapeNameFP is placed at the position of the eye node. Mounting a first-person image to the third-person world view mount points makes no sense. Quote Link to comment Share on other sites More sharing options...
Duion Posted December 22, 2015 Share Posted December 22, 2015 And from where is it placed on the eye node? From the center or a mount point. Quote Link to comment Share on other sites More sharing options...
saindd Posted December 23, 2015 Share Posted December 23, 2015 A mount point is a mount point, an eye node is an eye node. Both are named joints, but there is a reason they have different names. Either way, his problem is not related to a center or anything, you're wrong. Just check if useEyeNode is set and/or check the eyeOffset, if you don't have an eye node for each weapon model. Quote Link to comment Share on other sites More sharing options...
Duion Posted December 23, 2015 Share Posted December 23, 2015 So where do you build your model? Randomly somewhere in the coordinate system? Of course not, you build it at the center, so it is properly aligned. Alternatively you can use a mountpoint, to mount the shape on. Quote Link to comment Share on other sites More sharing options...
shoiko Posted December 23, 2015 Author Share Posted December 23, 2015 I've changed the eyeOffset to something other than 0 0 0 and it worked. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.