Beemertron Posted October 24, 2016 Share Posted October 24, 2016 Hey everyone, I'm a little new to game development, so I really appreciate the advice! I'm just looking to understand local translations a little better. Basically what I have is 2 blender models (that I downloaded off Turbosquid) I have the distance value to my first model set to 300, and the second model set to 1, however, the model that is set to 1 is moving faster then the model set to 300: game.subject.translate(BABYLON.Axis.Y, 300, BABYLON.Space.LOCAL); unit.mesh.translate(BABYLON.Axis.Y, 1, BABYLON.Space.LOCAL); So I guess my question is, is the distance value relative to something? Both models are about the same size. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 24, 2016 Share Posted October 24, 2016 Hello and welcome! Local space is the space where the mesh is at 0,0,0 with no rotation and no scaling. So if your first mesh has a scaling set to (0.001, 0.001, 0.001) then 300 units on Y axis will appear like 0.3 units in the global world Does it make sense? Beemertron 1 Quote Link to comment Share on other sites More sharing options...
Beemertron Posted October 24, 2016 Author Share Posted October 24, 2016 I think so. The first mesh, when I downloaded it was huge, so I did scale it down, but in Blender, I also scaled the second mesh in blender as well, but it needed to be scaled up. Would that created the difference that I'm seeing here? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 24, 2016 Share Posted October 24, 2016 Yep I don't know how but I'm sure there is a way to reset all transformations in Blender (ping @gryff) Beemertron 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted October 24, 2016 Share Posted October 24, 2016 @Deltakosh - er the "Man From Babylon" called so ... @Beemertron If you are scaling your models in Blender - make sure you "Apply the Scale" (In "Object Mode" ->Object->Apply ->Scale). If you have any rotations - apply those too. cheers, gryff GameMonetize and Beemertron 2 Quote Link to comment Share on other sites More sharing options...
Beemertron Posted October 25, 2016 Author Share Posted October 25, 2016 Just got a chance to fix this now, worked great, thanks for the help! gryff 1 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.
Note: Your post will require moderator approval before it will be visible.