Jump to content

gordonramp

Members
  • Posts

    398
  • Joined

  • Last visited

Posts posted by gordonramp

  1. I have..

     

    texture0="abstract::mesh_512x512.dds"

    texture1="abstract::mesh_512x512dot3.dds"

    shader="abstract::mesh_diffuse_bumpmap_skin.vert","abstract::mesh_diffuse_bumpmap_specular.frag"

    shadowshader="abstract::mesh_shadow_skin.vert"

     

    That's helped actually, I've got it sorted. Thanks.

  2. I know there are a few threads about this and I've tried all of the recommendations but am still having difficulty exporting an animated rig from Max. I've had the most luck exporting to Fbx and converting in UUnwrapPro. The soldier model converts fine. But when I try my own rigs, this is what happens...

     

    The animation is joined at the pelvis but the rest is separate from the mesh. Any idea why this might be? BTW. I'm using the Skin Modifier not Physique. :)

    post-35-12656607021425_thumb.jpg

  3. Ok, I'll explore this...

     

    Update:

    Success..

     

    require("scripts/class")
    local class=CreateClass(...)
    function class:CreateObject(model) 
    local object=self.super:CreateObject(model) 
    function object:Update() 
    if EntityDistance(fw.main.camera, self.model) < 10 then
    PointEntity(self.model, fw.main.camera, 3, 0.01)
    end
    end
    end

     

    Thanks :P

  4. Your right, it runs without an error now (C++ coder), however the object does not turn to face the camera as requested.

     

    Maybe someone has a simple working example of 'trigger code' to share. :P

  5. Ok, I thought I would have a go at using 'EntityDistance'. Using Lumooja's pseudocode as a base.. I placed a metal door on a terrain in the editor. Then using the basic fps Lua code, put this in the main loop..

     

    If(EntityDistance(fw.main.camera,metal01_1)<5) then
    PointEntity(fw.main.camera,metal01_1,3,0.01)
    end

     

    I gives me this error.. 'unexpected symbol near 'then''

    I guess it's a simple Lua code error, any ideas why that might be?

  6. I am looking at the idea of 'triggers'( initiating an event) but have no idea where to start. I assume some sort of collision code would be necessary followed by a pointing at the event. Like, the recording of 'Health'. I can't seem to find anything much about this on the Lua Forum. Any ideas? :P

  7. Finally I got this sorted. This class file will point a stationary character at the camera.

    -------------------------------------------

    require("scripts/class")

    local class=CreateClass(...)

     

    function class:CreateObject(model)

    local object=self.super:CreateObject(model)

     

    function object:Update()

    self.model:Point(fw.main.camera, 3, 1, 0)

    end

    end

    -------------------------------------------

  8. Thanks, I'll give it a try.

    Update: It can't be something as simple as placing

     

    PointEntity(character,fw.main.camera, 3, 1, 0)

     

    in the class file because I get an 'Access Violation' error.

  9. Well I found this command and it looks like it will do what I want which is to have an object face the camera when I'm moving around in fp mode. Say, a character watching you. Something like...

     

    PointEntity(character, camera, 3, 1, 0)

     

    The thing is, I'm not sure how to go about setting this up.

    Do I place the code in the Character's class file, or in the fp main loop?

  10. VicToMeyeZR,

     

    I'm not sure why you pointed out that piece of code but it could be useful to click on an object in a 3D scene. This is something I have been trying to figure out how to do.

     

    if MouseHit(1) == 1 then
    if MouseX() > object.location.x and MouseX() < object.location.x + object.size.x and MouseY() > object.location.y and MouseY() < object.location.y + object.size.y then
    object.color = Vec4(0, 1, 0, 1)
    end
    end

    The question is.. how can I adapt this to click on an object in a 3D scene so that an event can take place? It has x and y reference for the mouse but no z. Could it be something like..

     

    if MouseHit(1) == 1 then
    if MouseX() > object.location.x and MouseX() < object.location.x + object.size.x and MouseY() > object.location.y and MouseY() < object.location.y + object.size.y and MouseZ() > object.location.z and MouseZ() < object.location.z + object.size.z then
    object.color = Vec4(0, 1, 0, 1)
    end
    end

     

    But if that would work, how could I relate it to a particular object in the scene?

  11. Using the 'Pi-Main object', I can move the Textbox to a position on the screen in the Object Properties and when I run the program I can click on the object and it will turn green. Is that it , do I just put text over the top of it, or is it for input output?

    post-35-12643590694438_thumb.jpg

  12. Well if you need some tips on animation or art pipeline for the Leadwerks Engine, just ask. Also, if you get lipsync working in the Engine, I would have some paid work available if you wanted it.

×
×
  • Create New...