Alex88 Posted January 18, 2014 Share Posted January 18, 2014 Hello together, is it possible to make a playground from primitives in just "one big object"? I have created a prefab and attached a lua script to rotate the playground, but unfortunately it only rotate one box. Quote Link to comment Share on other sites More sharing options...
ChrisV Posted January 18, 2014 Share Posted January 18, 2014 It should work if you make all objects you want to group together, to have a parent object. So, for example, say you have an object called 'Box1', and another called 'Box2', then simply drag 'Box2' onto 'Box1' ( in the 'Scene' tab) to make it a child of 'Box1'. Hope that helps? Quote My Artwork. ZBrush 4R7 64-bit - 3DCoat 4.5 BETA 12 - Fl Studio 12 64Bit - LE 3.2 Indie version - Truespace 7 - Blender 2.71 - iClone 5.51 Pro - iClone 3DXChange 5.51 pipeline - Kontakt 5 - Bryce 7 - UU3D Pro - Substance Designer/Painter - Shadermap 3 - PaintShop Photo Pro X7 - Hexagon - Audacity - Gimp 2.8 - Vue 2015 - Reaktor 5 - Guitar Rig 5 - Bitmap2Material 3 Link to comment Share on other sites More sharing options...
Alex88 Posted January 18, 2014 Author Share Posted January 18, 2014 This was my first idea too and I saved it as a prefab, but unfortunately it doesn't work as expected. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 18, 2014 Share Posted January 18, 2014 Is the script attached to your parent box , not to a child ? Try saving your cubes group as a prefab and attach script to that prefab. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
DudeAwesome Posted January 18, 2014 Share Posted January 18, 2014 create a pivot as parent. all boxes are childs. rotate the pivot (cant test it right now but seems legit) Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
YouGroove Posted January 18, 2014 Share Posted January 18, 2014 I confirm the bug. Created a pivot , putting boxes as child and attaching a script to the pivot doing that : function Script:UpdatePhysics() local window=Window:GetCurrent() if (window:KeyDown(Key.V)) then self.rot = self.rot + 1 self.entity:PhysicsSetRotation(0,self.rot,0.02,0.5) --self.entity:SetRotation(self.rot,self.rot,0.02,true) self.entity:SetColor(0,0,1) end end unsing entity:PhysicsSetRotation : LE 3.0 crash using entity:SetRotation nothing happens Could it be a pivot or a cube as parent , it should work in both cases. ------------- @Alex88 : it can be frustrating to not be able to do such simple stuff using BSP, but i recommend you to simply use models instead using BLender or Sketchup programs for example. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
cassius Posted January 18, 2014 Share Posted January 18, 2014 Why not just make the ground in blender and import it? Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ Link to comment Share on other sites More sharing options...
shadmar Posted January 18, 2014 Share Posted January 18, 2014 Make an empty script call it : nocollapse.lua (doesn't need to have any code in it) Add the script to box2,3,4,5 They shouldn't collapse on run anymore and respect the parent rotation and position. So if you rotate the parent, they should follow. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Alex88 Posted January 19, 2014 Author Share Posted January 19, 2014 Is the script attached to your parent box , not to a child ? Try saving your cubes group as a prefab and attach script to that prefab. This is exactly what I have done already. create a pivot as parent. all boxes are childs. rotate the pivot (cant test it right now but seems legit) If I attached my lua script to the pivot, nothing rotates. Here is my lua script: function Script:UpdateWorld() self.entity:Turn(1 * Time:GetSpeed(), 0, 0, true) end I confirm the bug. ... @Alex88 : it can be frustrating to not be able to do such simple stuff using BSP, but i recommend you to simply use models instead using BLender or Sketchup programs for example. Hehe, you are absolutely right. It is frustrating to not be able to do such a simple stuff. So did I found a bug in Leadwerks? Why not just make the ground in blender and import it? Because I was too lazy for the UV mapping. Make an empty script call it : nocollapse.lua (doesn't need to have any code in it) Add the script to box2,3,4,5 They shouldn't collapse on run anymore and respect the parent rotation and position. So if you rotate the parent, they should follow. This really works! I don't know why, but it works! Can you explain it to me? Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 19, 2014 Share Posted January 19, 2014 It's csg behaviour, there is an improvement request here : http://www.leadwerks.com/werkspace/topic/6893-csg-mergedont-merge-option/page__hl__empty+script Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Alex88 Posted January 19, 2014 Author Share Posted January 19, 2014 Thank you very mutch! Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 19, 2014 Share Posted January 19, 2014 Classic, but missing boolean BSP "MERGE" should do this easyly without any empty script tedious tasks. Well just wait for some "cut" and "merge" BSP tools. 1 Quote Stop toying and make games Link to comment Share on other sites More sharing options...
DudeAwesome Posted January 19, 2014 Share Posted January 19, 2014 this behaviour is just confusing 1 Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
Rick Posted January 20, 2014 Share Posted January 20, 2014 I believe it's an optimization thing so it may not make sense directly, but to speed things up I think it may be needed. If CSG doesn't have a script attached to it then it's really dummy geometry that has no function but collision/visual. That's the idea anyway. 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.