Jump to content

Arska134

Members
  • Posts

    119
  • Joined

  • Last visited

Posts posted by Arska134

  1. traj.jpg

     

    That was done with shotgun. (Weak penetration) Rifles etc... can go through wall easily. So bullet ballistics functions. It's LE 2.5 and Blitzmax

     

    Made this easy to use with my functions:

    CreateBallisticBullet(shooter:TEntity, sound:TSound, rotX:Float, rotY:Float, height:Float)
    UpdateBallisticBullets(DrawTraj=False)
    NewBallisticWeapon(name$, magazineSize, caliber$, sound, velocity, bulletDrop)
    EquipBallisticWeapon(slot)
    GetBallisticWeaponMagazineNow(slot)
    GetBallisticWeaponMagazineFull(slot)
    GetBallisticWeaponCaliber$(slot)
    AddBallisticBullets(caliber$, amount)
    ReloadBallisticWeapon(slot)
    GetBallisticBulletAmount(caliber$)
    

     

    What do you think? Any game ideas?

    • Upvote 2
  2. and swept collisions are turned on on all those boxes? i don't know at this point... other than to make the boxes physics body one solid entity instead separate one for each box? if all the boxes are meant to be static then no reason not to make everything use one physics body...

    Yes swept collision is on. Problem is that those blocks are destroyable. :/ Blocks are static, but there is no way to make controller be able to interact without a body in blocks.(?)
  3. what does your controller:Update() function look like? did you try turning up the iterations parameter?

    updatecontroller(player, 0,0,move*12, jump,50, 1, crouch)
    

     

    I tried to turn it to 10, but not change.

     

    Edit: with 1000 iterations it slides down but FPS drops very low. (20 fps)

     

    Edit 2: Looks like it sometimes gets stuck in the ground when jumping. (Go little bit trough ground)

  4. Maybe the fact that your controller stepheight is being set to 0 that's causing an issue? Maybe try 0.2? Also, in earlier versions of LE2, we had to play around a lot with the physics iteration parameter in the controller:Update() function. You could try increasing/decreasing that value to see if it helps.

    Hmm... looks like it helps little bit. If i put stepheight to negative values like -0.2, it won't get stuck if i jump to wall and then press nothing it slides down, but when i keep pressing button againist wall it kind of "graps" in wall. If i let go then it slides down again. Very frustrating.. :/ Any ideas?

     

    Edit: It penetrates wall when i keeps pressing against it. Any way to avoid that and not letting controller get inside of block?

  5. So idk if this will help you but i'm attaching a link to the new location of all the LE 2.5 documentation. I would highly recommend you bookmark this if you are still using LE 2.X

    http://www.leadwerks.com/werkspace/page/Documentation/le2

     

    as far as your particular issue. I'm going to assume that you've tried turning off sweep collisions correct? If i'm understanding your issue properly is that when your character runs and jumps, when it contacts the wall, it gets "stuck" and doesn't slide down the wall. Or are you stating that when you walk to the edge of a wall b/c it is too big it doesn't fall down the wall.

    Yes i have bookmarked command reference long time ago. And yes first one is correct.

    it gets "stuck" and doesn't slide down the wall.

    Controller little bit penetrates the wall.

  6. Hi. Just quick question if someone remembers anything about 2.5. I have problem that controller overlaps little bit 1x1x1 sized cube body, so it it kind of gets stuck on those bodies. I am using Sweptcollision(), but it's not helping at all. And there is lot of these bodies in my project. (over 3000)

     

    Controller creation:

    player=CreateController(1.8, 0.3, 0, 45, 1.3)
    

  7. yes if the gmf has no bones the skin shader will not work on it- the opposite is true as well. a model with bones with a non-skin shader will not map correctly (all red if memory serves) and will not animate.

     

    i suspect you want the bone as it has animation applied to it - so i suggest you try another version of FBX to export to from 3dsmax.

    How i can try another version of FBX?

     

    Edit:

    Found it. Which version would be latest working with gmf?

     

    Edit 2:

    2010 It is.

  8. Remove the skin shaders from the material file and it should map correctly as there are no bones in the gmf model.

    So material file should be like this?

    texture0="abstract::box.dds"
    shader="abstract::mesh_skin_diffuse.vert","abstract::mesh_diffuse.frag
    

     

    Same problem occurs.

     

    What you mean no bones in gmf model? O_o

     

    Edit:

    Looks like it's working like this:

    texture0="abstract::box.dds"
    shader="abstract::mesh_diffuse.vert","abstract::mesh_diffuse.frag"
    

  9. Anyone knows what i am doing wrong when i try to convert fbx to gmf by fbx2gmf.exe? When material is applied to model this happens.

    modelviewer.png

     

    It's supposed to be just small cube, but it's... like that...

     

    I simply exported to fbx, dragged fbx to "fbx2gmf.exe" and gmf comes out, but model viewer does that.

     

    Here is material file:

    texture0="abstract::animatehuman.dds"
    shader="abstract::mesh_skin_diffuse.vert","abstract::mesh_diffuse.frag"
    shadowshader="abstract::mesh_shadow_skin.vert"
    

     

    I am using Autodesk 3ds Max 2013 64-bit.

     

    I even tried to use GMF plugin for 3ds max, but same happens. Files are attached to this post,

    box.zip

  10. More info!

     

    I have been using old "lua-gluefunctions.bmx". When i created new one with this code:

    Framework leadwerks.engine
    Import "C:\Leadwerks Engine SDK\BMX\Framework\framework.bmx"
    Import lugi.generator
    AppTitle:String = "Create Lua Functions"
    generateGlueCode("lua-gluefunctions.bmx")
    Notify("All Done", 0)
    End
    

     

    Then is compile my project and i get error from new lua-gluefunctions.bmx.

    "Compile Error Missing function parameter 'extra'"

  11. LE2 with Blitzmax. I don't understand why it's not working anymore. O_o And i think environment_atmosphere.gmf was working months ago when i just put it in map with editor, but now i need to load skybox in code. I think problem is same with this script. Any way to load script in Blitzmax code?

     

    I really need this script in my project.

  12. Why Day & Night script isn't working anymore? It works in editor, but when i compile my project in Blitzmax sky is black and script is missing. Still working with my old project even after re-compile. I tried to use old shaders.pak and scripts but still nothing shows up.

  13. Hello!

     

    I just modeled wooden log model for my project. Problem is that when i add my texture, it crashes in any leadwerks application with "Memory access violation".

     

    It has been working, but now when i have had little bit of break and started modeling again, i can't get texture working. I think i miss something here.

     

    But anyways i here is all model files attached to this post.

    Log model.zip

  14. I think it's not problem because vehicle makes jump and when it's landed wheels are stuck in ground again.

     

    Here is some new code:

     

    Global Car:TEntity=LoadModel("abstract::"+carname$+".gmf")
    'ScaleEntity Car,Vec3(2,0.5,4)
    
    Local CarBody:TBody=CreateBodyBox(2,0.5,4)
    moveentity carBody, vec3(0,-0.2,0)
    SetBodyMass CarBody, CarMass
    EntityParent Car,CarBody
    entitytype carbody, 3
    Global vehicle:TVehicle=CreateVehicle(CarBody)
    SetBodyFriction(carBody, 0.5, 0.5)
    ' Asetellaan renkaat
    AddVehicleTire(vehicle, Vec3(FRightTirePosX, FRightTirePosY, FRightTirePosZ),tireradius,suspensionlength,springconstant,springdamper) 'oikea etu
    AddVehicleTire(vehicle, Vec3(BRightirePosX, BRightirePosY, BRightirePosZ),tireradius,suspensionlength,springconstant,springdamper) ' oikea taka
    AddVehicleTire(vehicle, Vec3(FLeftTirePosX, FLeftTirePosY, FLeftTirePosZ),tireradius,suspensionlength,springconstant,springdamper) ' vasen etu
    AddVehicleTire(vehicle, Vec3(BLeftTirePosX, BLeftTirePosY, BLeftTirePosZ),tireradius,suspensionlength,springconstant,springdamper) ' vasen taka
    SetBodyMass CarBody, CarMass
    EntityType CarBody,2
    ' Create visible tires on tire places
    Local tiremesh:TMesh[4]
    Local tirebody:TBody[4]
    For Local i:Int=0 To 3
    tiremesh[i]=CreateCylinder()
    tirebody[i]=CreateBodyCylinder( TireRadius, TireWidth )
    entitytype tirebody[i], 2
    Next
    

     

     

    And later in loop:

    For Local ii:Int=0 To 3
    tiremesh[ii].SetMatrix(GetTireMatrix(vehicle,ii))
    tirebody[ii].SetMatrix(GetTireMatrix(vehicle,ii))
    Turnentity tiremesh[ii],vec3(0,0,90)
    Turnentity tirebody[ii],vec3(0,0,90)
    scaleentity tiremesh[ii], vec3(TireRadius,TireWidth,TireRadius)
    scaleentity tirebody[ii], vec3(TireRadius,TireWidth,TireRadius)
    Next
    

  15. Here is some vehicle code:

    Global Car:TEntity=LoadModel("abstract::"+carname$+".gmf")
    
    Local CarBody:TBody=CreateBodyBox(2,0.5,4)
    moveentity carBody, vec3(0,-0.2,0)
    SetBodyMass CarBody, CarMass
    EntityParent Car,CarBody
    entitytype carbody, 3
    Global vehicle:TVehicle=CreateVehicle(CarBody)
    SetBodyFriction(carBody, 0.5, 0.5)
    
    AddVehicleTire(vehicle, Vec3(FRightTirePosX, FRightTirePosY, FRightTirePosZ),tireradius,suspensionlength,springconstant,springdamper)
    AddVehicleTire(vehicle, Vec3(BRightirePosX, BRightirePosY, BRightirePosZ),tireradius,suspensionlength,springconstant,springdamper)
    AddVehicleTire(vehicle, Vec3(FLeftTirePosX, FLeftTirePosY, FLeftTirePosZ),tireradius,suspensionlength,springconstant,springdamper)
    AddVehicleTire(vehicle, Vec3(BLeftTirePosX, BLeftTirePosY, BLeftTirePosZ),tireradius,suspensionlength,springconstant,springdamper)
    SetBodyMass CarBody, CarMass
    EntityType CarBody,2
    
    Local tiremesh:TMesh[4]
    For Local i:Int=0 To 3
    tiremesh[i]=CreateCylinder()
    Next
    

     

    Later in main loop:

    AddTireTorque(vehicle,torque,2)
    SetSteerAngle(vehicle,steerangle,2)
    AddTireTorque(vehicle,torque,0)
    SetSteerAngle(vehicle,steerangle,0)
    
    AddTireTorque(vehicle,torque,3)
    SetSteerAngle(vehicle,0,3)
    
    AddTireTorque(vehicle,torque,1)
    SetSteerAngle(vehicle,0,1)
    
    For Local ii:Int=0 To 3
     tiremesh[ii].SetMatrix(GetTireMatrix(vehicle,ii))
     Turnentity tiremesh[ii],vec3(0,0,90)
    scaleentity tiremesh[ii], vec3(TireRadius,TireWidth,TireRadius)
    Next
    

  16. Hello everyone!

     

    I have to ask if someone knows solution to my problems with vehicle wheels.

     

    First of all picture:

    wheels.png

     

     

    First problem is that why my vehicles wheels are going through terrain? And how it can be fixed?

     

    Second one is, while vehicle is moving wheels are not keeping their location. I am not meaning springs, but wheels are also moving in x and z axis when vehicle is moving.

×
×
  • Create New...