alanz2223 Posted March 12, 2016 Share Posted March 12, 2016 Hi I have a missile I am importing into babylon from blender, the missile's propellers and small outer accessories are parented to the main body of the missile. The problem is that whenever I place it into my babylon scene the all the child elements are out of place, as if they took on the properties of the parent object (All i want to do is have rotations applied to the parent, apply to the children as well). Here is the .babylon file if you would like to place it into the sandbox. https://www.dropbox.com/s/a038ipq37a7cku6/AimParented2.babylon?dl=0 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 12, 2016 Share Posted March 12, 2016 I ran into this problem when trying to import more then one mesh in a .obj file that did not have their origin aligned to 0,0,0. My solution was to separate the objects and import them as separate files (im sure there is a better way to do this but this was my c4d to babylon work around) So make them separate objects, and import them and such... once they are in the scene take the object that you want as a child and set its parent so: var childA = BABYLON.Mesh....; var childB = BABYLON.Mesh....; var parentObj = BABYLON.Mesh....; childA.parent = parentObj; childB.parent = childA; now any transformations to the parent object will move both of the children, a movment to childA will move both childA and B and a movment to B will only affect B... I hope I was clear enough, sorry I was doing this answer on a 5 min break from working... Quote Link to comment Share on other sites More sharing options...
alanz2223 Posted March 13, 2016 Author Share Posted March 13, 2016 Well, I tried this and the children retain their position relative to each other, but they they appear perpendicular to the body of the rocket instead of on the same axis. Here is a picture. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 13, 2016 Share Posted March 13, 2016 transform them after they are parented and rotate and position then as they are needed.... you can always move them after they are parented. also by looking at your model, why not just retopologize it and make the wings and the body all a single model? this will save on draw requests. post a drawing of what it is supposed to look like, or a screen shot and I will whip something up for you right now that will perform better for you. also it looks like your texture is reversed and needs to be mirrored horizontally Quote Link to comment Share on other sites More sharing options...
alanz2223 Posted March 13, 2016 Author Share Posted March 13, 2016 Well I can only do basic modeling and don't even know what retopologize is, sorry. The reason I didn't join the mesh into a single object is because I would like to have the back propellers split from the body and leave only the payload as an animation before it explodes. Anyways I really appreciate your aid, I suppose if you would like to help it would be much easier to download the almost complete model than to start from scratch. I downloaded it from blendswap @ http://www.blendswap.com/blends/view/22736 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 13, 2016 Share Posted March 13, 2016 I got you friend, I needed a reason to test my playground extensions so after I finish some of those ill simulate a surface to air middle for you complete with a trajectory and target tracking system. Stay tuned it might not be done tonight but in the next day or so. Quote Link to comment Share on other sites More sharing options...
alanz2223 Posted March 13, 2016 Author Share Posted March 13, 2016 That is definitely much more than I am asking for but hey thanks bud, Ill stay tuned. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 13, 2016 Share Posted March 13, 2016 Here is your missile, I mocked up really fast, you can always draw more complex textures over it. Ill get to rigging it and showing and example of how to use a simplified mesh imposter. I decided to keep the wings attached because... that's what missiles do, not one rocket or missile ejects its fins prior to impact. Now having them unfold out of the launcher is realistic and totally possible but Ill do this "rigged" missile first to demonstrate some concepts for you. Quote Link to comment Share on other sites More sharing options...
alanz2223 Posted March 13, 2016 Author Share Posted March 13, 2016 That looks great, good thing that missiles don't really have complex animations, its just the frame spinning on an axis, but what I essentially want to do is have the rocket be controllable (like a valkyrie rocket from COD) before it explodes into a war plane. I think this is a great start. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 14, 2016 Share Posted March 14, 2016 I still plan on helping you with this, I am just super overloaded at the moment with demanding clients who all want their systems done yesterday so yeah, give me a second I'm interested and doing a simulation like this for my own reasons as well though so I'll make sure to keep you posted 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.