dennis Posted September 6, 2011 Share Posted September 6, 2011 Hey all, I have made a model but the only problem it constant gives is no collision. I can just walk trough it How can I solve this on the easy way? I attached the files the obj and mtl file is listed in a sub directory rock.zip what am I doing wrong ? Cheers! Quote Link to comment Share on other sites More sharing options...
Roland Posted September 6, 2011 Share Posted September 6, 2011 You have to turn on Collision for the model in the Editor. Mark the model in the tree and open the script. Add following lines and save require("scripts/class") local class=CreateClass(...) Then if you double click on an instance of the model you will be able to set Collision type. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
macklebee Posted September 6, 2011 Share Posted September 6, 2011 the problem is with the PHY file that you have in that zip file... I dont know how that was generated, but you can see that physics body is not located any where near the visual mesh. Delete the PHY file, and reopen the Editor, drag the rock into the scene and it will create the PHY file for you. to see the problem yourself, go to Tools>Options...>Display and click the Show Physics option EDIT-- once you get that straightened out then follow Roland's advice with the script.. I like to use this script for basic scenery items that has the collision property already set, so I don't have to open the property dialog... require("scripts/class") require("scripts/constants/collision_const") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) object.model:SetKey("collisiontype", COLLISION_SCENE) end Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
dennis Posted September 6, 2011 Author Share Posted September 6, 2011 Thanks!! You guys are the best, it totally worked for me I even can't believe it worked for me Cheers 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.