jessewisener Posted January 14, 2014 Share Posted January 14, 2014 Leadwerks 3.1 Indie I've looked for hours for a solution to these problems regarding a maze model I made in Blender and I can't find any, which means the solutions must be right under my nose. Problem one: I imported the maze model and I can't seem to set the physics correctly so that the player doesn't fall through the model. The model contains 3 pieces: floor, walls, and walls-top. I set each of them to rigid body and I have tried both Scene and Prop for collision type. Character is set to Rigid Body and collision type is Character. Proplem two: I can't seem to turn off smooth shading on the maze model. I have gone into Edit Model and calculated the normals as one video showed, but no dice. Any help would be appreciated. Thanks. -Jesse Quote Link to comment Share on other sites More sharing options...
Interference Posted January 14, 2014 Share Posted January 14, 2014 Scene is for static geometry, prop is for dynamic stuff (pushable boxes etc). Have you generated a physics model for your objects? Assuming you haven't already, do the following: 1. R-click on the mesh in the assets tab, selecting "generate shape" and picking one of the two options. Since these seem to be static meshes that you're going to be walking around, I'd suggest you pick "polymesh". It'll prompt you to save the resulting PHY file. Give it a name and save it to an appropriate folder. 2. Place the mesh in the scene, click on the "Scene" tab on the right and select the physics tab at the bottom to edit the physics settings. Change the "Shape file" to the PHY file you generated. Set collision type to scene. 3. Save the map and test. Hopefully that works, because otherwise I'm fresh out of ideas. Quote Link to comment Share on other sites More sharing options...
jessewisener Posted January 14, 2014 Author Share Posted January 14, 2014 Crud. No luck. I wonder if it has something to do with the parented parts in the mesh? I'll try exporting the pieces indivdually from Blender and seeing if they'll line up, then generate phy files for each. (Thanks for showing me how to do that) Quote Link to comment Share on other sites More sharing options...
SarperSoher Posted January 14, 2014 Share Posted January 14, 2014 How do you move the character? Are you using SetPhysicsPosition too or just Move? As far as I know, you have to set the physics position to the player's position too otherwise it's not updated and stays at the start position. Also I guess you would have to move your character in UpdatePhysics function. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 14, 2014 Share Posted January 14, 2014 Be aware that LE3 don't manage collision against 3D planes, if your floor or walls are planes the collision will fail (at least when i tested it), so you'll need models having a real volume for floor, walls etc .. 1 Quote Stop toying and make games Link to comment Share on other sites More sharing options...
jessewisener Posted January 16, 2014 Author Share Posted January 16, 2014 That would explain it then. I kept them all as planes to keep the geometry down. Thank you for that! Is that in documentation somewhere? I try to not ask for help as much as possible, so if I missed some documentation I'd like to know. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 16, 2014 Share Posted January 16, 2014 No collision system and particular features as planes not colliding is not documented. I try to not ask for help as much as possible You should ask, sometimes people will bring you solutions, documentation is one thing, what people try to do is another and you'll find also problems solutions on "programming" and "Bug Reports" also. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted January 16, 2014 Share Posted January 16, 2014 You can create a generic collision model (with a little volume) and import that. Right click it in the assets section and say Generate Shape (you might be able to do this on your current model but it might be too skinny). You can also supplement your current model with csg with the invisible material painted on it to give collision. Quote Link to comment Share on other sites More sharing options...
jessewisener Posted January 17, 2014 Author Share Posted January 17, 2014 I try to not ask for help as much as possible You should ask, sometimes people will bring you solutions, documentation is one thing, what people try to do is another and you'll find also problems solutions on "programming" and "Bug Reports" also. True. Just want to make sure I RTFM'd first. So does the single plane answer also explain why I have perpetual smooth shading? 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.