Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. Collisions only work on bodies and terrains. LoadModel will load/create an invisible physics body with the visible mesh as the child. LoadMesh just loads the visible mesh. Since you want to color the visible child mesh of the model, you have to set the recursive parameter to 1. entity:SetColor( color:TVec4, recursive )
  2. Use LoadModel for loading the gmf. Collisions only work on bodies and terrains. LoadModel loads a body with its child mesh. or just place the gmf into your scene using the editor and set the collision type property via the property dialog using the basic script: require("scripts/class") local class=CreateClass(...)
  3. If the box has an object script you can use the inherent collision callback (as shown in the template.lua script) and check the collision type given for the controller to drive the desired action. Granted this could be done using the collision callback in any other language as well.
  4. this blog shows a picture of a primitive with the option of choosing the number of sides as well as increasing the smoothing up to 32 levels http://www.leadwerks...r-enhancements/
  5. The key word that Pixel used is "dynamic". A dynamic phy body file must be created by using phygen. If it was auto-created by the editor/LE then it is a static phy body that will not respond to physics. Also since there have been multiple changes since 2.3 first came out in newton, the phy body might be of an older serialization that will not work with the current newton used in LE.
  6. http://www.leadwerks.com/wiki/index.php?title=Buffers
  7. 3dws and the LE are two different products. 3dws came out long before LE. If you want your LE GMF model to show the texture that you mapped in 3dws then use a material file. If multiple textures applied to the model, then you need a material file for each texture applied. Read the manual in the link that was posted above.
  8. In Leadwerks, you must have a material file which the engine uses to assign textures and shaders to the model. To get properties to show, you must have at least the basic setup in its lua script: require("scripts/class") local class=CreateClass(...) Read this: Leadwerks User Guide
  9. Since you are using a door with physics then add a force to it... or just rotate the door with RotateEntity to give you more control on opening and closing, but if you are going to do that then there is no reason to use physics with the door.
  10. On any of the entity commands, when the global parameter is set to 1 then the action will be applied to global space. Local = 0. This only comes into effect if the entity has a parent. If no parent, then this parameter has no effect as it will act in global space no matter what.
  11. If this is what you are using for LE2 currently then I suspect this is the cause of your issue here. Please list your computer specs in your profile as it will probably reveal the cause of that issue.
  12. looks like it is intentional as it happens on other physics bodies as well, not just pivots
  13. The body apparently needs mass to report velocity even if it is just a pivot... but then it has the unfortunate effect of falling through the scene. Give it mass and then making it a fixed joint instead of parenting seems to work though.
  14. try closing all the extra **** down on your computer - looks like you have multiple modelviewers open at the moment. also make sure you dont have multiple versions of the files with the same name. if that doesn't work - try a fresh install of the SDK, update your graphic card drivers, download your zip file from here, make the changes I showed, and try it again.
  15. no. the mat file you sent didnt have the skin shader. it had this: shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag" and i changed it to this: shader="abstract::mesh_skin_diffuse.vert","abstract::mesh_diffuse.frag"
  16. works fine for me once i put the shader back to a skin shader.
  17. zip up the model, the material file, and the texture and post it here. At this point, we can only speculate what is wrong.
  18. The material file is just a text file that the engine uses to assign textures and shaders to a mesh. All you need to do is to copy what I posted above into your dirtied bricks.mat file. i suggest you read this: Leadwerks User Guide as for how you created the mat file originally, the genmat.exe just creates generic material files for non-animated models.
  19. no. the material file needs the skin shader as shown in josh's link on animation, wchris' post, metatron's post, and the example that has been sent to you previously. the material file should look like this: texture0="abstract::dirtied bricks.dds" shader="abstract::mesh_skin_diffuse.vert","abstract::mesh_diffuse.frag" shadowshader="abstract::mesh_shadow_skin.vert",""
  20. that's not the full story as it doesn't take into account gimbal lock and the Attitude (Y) is inversed in LE. X = math.atan(mat.jz/mat.kz) * (180/math.pi) Y = math.asin(mat.iz) * (180/math.pi) Z = math.atan(mat.iy/mat.ix) * (180/math.pi) the above essentially only works in LE when: X is between -90 and 90 with very low values for Y&Z Y is between -90 and 90 with very low values for X&Z and Z is between -90 and 90 with very low values for X&Y there is more information about this from the place mika copied this from: http://www.opengl.or...l=1#post1135896 which has a link to here: http://www.euclidean...Euler/index.htm
  21. Could be a problem with the blender fbx exporter or with the way you are doing it... dunno because i dont use blender. You can try another format as there are other available converters in the Tools folder.
  22. The brick anim.gmf does not have a material assigned. You need to have dirtied bricks.mat listed - means you are not exporting as a FBX correctly I would imagine. And when you get that working then you have to use a skin shader, like you have been told before to use and what is also shown in the link above from Josh.
  23. http://www.leadwerks.com/wiki/index.php?title=Raycasting http://www.leadwerks.com/files/Tutorials/CPP/Collision_And_Raycasting.pdf http://www.leadwerks.com/files/Tutorials/CPP/Collision_And_Raycasting.wmv
  24. In bmax there is a method that can be used on bodies to check if it has come to rest or not, body.Active() and it looks like something of it was exposed at one point to lua as BodyActive() / BodyFrozen() but neither appear to work - unless there is some particular thing I am missing in its usage to get it to work. But if it doesnt work in lua, i suspect it wasn't ever introduced to c++.
  25. well the code is messed up in the info_camera_node script. it has this line: group:AddProperty("starthere","",PROPERTY_BOOL,"Start here") and it should look like this: group:AddProperty("starthere",PROPERTY_BOOL,"","Start here") to properly create a checkbox. But you can also just place a 1 in the current version and it should still work
×
×
  • Create New...