Jump to content

DaDonik

Members
  • Posts

    376
  • Joined

  • Last visited

Posts posted by DaDonik

  1. The LE vehicle stuff is realized using Newton joints. But that is the side of it you won't see. You just have the vehicle commands to

    build your vehicle.

    There is no possibility to give your tires mass, BUT you can use any body commands on the vehicle body itself. You can "simulate" the

    wheel mass by adding a constant force (equivalent to the wheel mass) to your vehicle body. In a similar fashion you can also add

    air resistance, depending on the vehicle speed.

    Hope that helps a bit =)

  2. When you want to have an airplane/spaceship which is physically interactive you should have look at

    CalcBodyVelocity() and SetBodyVelocity(). Same for CalcBodyOmega() and SetBodyOmega().

     

    What i tried was:

     

    Load a ship/airplane. (Ship)

     

    Create a pivot. (Piv)

     

    Every loop:

    // Reset the pivot position
    SetEntityMatrix(Piv, GetEntityMatrix(Ship));
    

     

    //Move the pivot around (user input / AI) 
    MoveEntity(Piv, SomeUserInputVector); 
    

     

    // Calculate the ships velocity
    TVec3 Vec3Velocity = CalcBodyVelocity (Ship, EntityPosition (Piv, 0), 1.0f);
    SetBodyVelocity (Ship, Vec3Velocity, 0);
    
    // Calculate the ships angular velocity
    TVec3 Vec3Omega = CalcBodyOmega (Ship, EntityRotation (Piv, 0), 1.0f);
    SetBodyOmega (Ship, Vec3Omega, 0);
    

     

     

    That way any projectile hitting your ship will automatically affect it via physics (with zero programming) :)

  3. Im' afraid you can't do this at all. At least not with the current version of Framework.

    The thing is, that the DOF shader is running after the skybox and everything else is rendered into a texture.

    There is no way the shader can distinguish between the skybox/background and distant mountains/models.

     

    I might be wrong, as i'm not using the latest framework...let's hope :lol:

  4. Also, on your screenshots of the LW Editor, how did you setup you layout like that? With the tabs and stuff for entities, models, etc?

     

    "MyModels_Trees_Tree1.gmf" will show up in the editor as the folder "MyModels" with the subfolder "Trees" with "Tree1" in it.

  5. I suggest saving 4 times an hour and with an ever increasing number on the back.

    Test_1, Test_2, ...

    Also don't forget doing daily backups to at least 2 independent external HD's (if it's really important stuff).

  6. For the trigger, HideEntity() will disable any collisions with it and therefore the collision callback will not be called.

    You could also set the EntityType to some value that is not used in you game.

    Both examples require you to set up the collision callback and check in there, what collided with your trigger.

  7. Use the following lua script for you ball:

     

    require("scripts/class")
    local class=CreateClass(...)
    
    function class:CreateObject(model)
    local object=self.super:CreateObject(model)
    
    model:SetElasticity(3.0)
    end
    

     

    The documentation says that only values from 0.0 to 1.0 can be passed to SetElasticity, but anything below

    1.0 will not make the ball bounce nicely.

×
×
  • Create New...