Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Everything posted by tipforeveryone

  1. Below code was attached to a Pivot function Script:Start() self.box1 = Model:Box(0.2,0.2,0.2) self.box1:SetPosition(self.entity:GetPosition()) self.box2 = Model:Box(0.2,0.2,0.2) self.box2:SetPosition(self.entity:GetPosition() + Vec3(0.5,0,0)) end function Script:UpdateWorld() if window:KeyHit(Key.F2) then local pos = self.box1:GetPosition() local joint = Joint:Ball(pos.x,pos.y,pos.z,self.box2,self.box1) joint:SetLimits(10,10) joint:EnableLimits() self.box2:SetMass(1) self.box2:AddForce(100,100,100) end end It works for Joint:Hinge(), I can not set minimum cone angle and twist angle for Joint:Ball anymore.
  2. Thank you SGB for your explanation, this works
  3. I don't get it My character skin still disappears. Is that "self.torso" a bone ?
  4. I don't know I did not see any post before, can you show me please? Good idea, but I want this AI avoid me completely like this
  5. I use Entity:GotoPoint() on my AI character. It moves perfectly from point A to point B If my player controller stands between A and B, this AI character will push it. If I set my character mass greater than AI's , AI character will be stuck a bit and take time to "slowly" move around my cylinder physic shape. How can I make my AI move around my player character properly when using GotoPoint ? I need him to avoid my player character's position. I am sure that I can't use world:BuildNavMesh() every frame for this kind of pathfinding...
  6. @AggrorJorn @reepblue I tested these settings with Leadwerks Blender Exporter and it gave me the same result for object's dimensions. You still need to collapse the model in Leadwerks Model Editor to make sure model local rotation is correct. I updated my post too.
  7. It should be great if you can create a game world which has exact real-life object's dimensions. If you are using Blender to make game props for Leadwerks, these are some simple steps to help you archive the dimension match up. Step 1: In Blender, go to Properties panel > Scene tab > Unit group Choose "Meters" from list. Make sure Length = Metric, Angle = Degree, Unit scale = 1 Step 2: This step is optional but can make you feel better with grid floor In 3D View, Press N to open Properties region > Display group Change Lines = 256, Scale = 0.1 From now on, you can adjust object's dimensions parameters in Properties region to match real-life dimensions, it will be the dimensions when you import models into Leadwerks. Don't for get to Apply Transformation for object model, it is important. Do this before adjust object's dimensions. In blender Use Ctrl + A > Location / Rotation & Scale Step 3: Fbx export Menu File > Export > Fbx Choose Version = FBX 7.4 binary Scale = 0.01 Step 4: Adjust exported model in Leadwerks Game Editor Double click mdl file in Assets Explorer to open it in model editor. Menu Tools > Collapse. This make sure model local rotation is correct. Menu Files > Save. I attached my template .blend file below this post. It included a 1.7m height human model for better reference. Leadwerks Blender Scale.zip
  8. I figured that out too, but I need my AI character to be closed to the wall as much as posible. A cover system which AI can put his back on the wall while sneaking or covering.
  9. It is sad to know that, I hope Leadwerks has an editable Navmesh system in the future...
  10. How can I make the gap between built navmesh polygon and obstacle smaller. I need my character to get more closed to the wall when I use entity:GoToPoint()
  11. This is Leadwerks 4.3 This problem happens when you choose a box to be --entity "Point", it works fine with Pivot Run this simple thing and you will get error when pressing A
  12. Total agree, sometime I check out Leadwerks forums on steam and see many questions from that community but I am too lazy to get in there everyday.
  13. CSG is the best for: - Wall, floor, ceiling, moving platforms, doors or anything blocks out player's navigation. - Some primitive objects which we are too lazy to create in 3D application. - You can apply, scale material on CSG Brushes without paying attention to UV Mapping. - Make trigger box for player.
  14. What a pity, it should be a really valuable function..
  15. I wonder why camera:Set/GetHDRMode is not listed in Library ? I have made some test for this function but see not much diffirent between SetHDRMode(true) and SetHDRMode(false) How can I use this function properly ?
  16. Thank you guys. Finally solved this problem, I neutralized all window:KeyKit in all script files then rewrite functions to execute my needs There should be only one window:KeyHit in a whole game and placed in character controller script.
  17. You are right, my "if window:KeyHit" was placed in many script, I will make more research to solve this thanks for your advices
  18. @Aggror: Yes this will solve the problem of window:KeyHit but affect window:KeyDown too, I use ASWD for character movement and they are flushed too, make my character unmovable. So that I think it is not good to put window:Keyflush() anywhere. Is there any way to flush only one key ? @Rick I have a same thinking now I may combine window:KeyDown with some bool variable @SGB: I want a key to execute an unique function only in specified condition(this case is player is inside a room), when player is outside the room, that key will do another task when hit. Ex: Press H in room 1 ~> display "Rick" Press H in room 2 ~> display "Josh" Press H in room 3 ~> display "SGB" etc... one key can execute diffirent tasks in a specified condition, so that I need to put window:KeyHit under an if statement If I put if statement inside if window:KeyHit(). It does not work this code does not work if window:KeyHit(Key.H) then if self.room == "Room1" then ... end if self.room == "Room2" then ... end if self.room == "Room3" then ... end end this does but if I use this, I will have problem which I describe in the first entry of this topic if self.room == "Room1" then if window:KeyHit(Key.H) then *dosomething* end end if self.room == "Room2" then if window:KeyHit(Key.H) then *dosomething* end end if self.room == "Room3" then if window:KeyHit(Key.H) then *dosomething* end end
  19. Same resuit I put window:FlushKeys() at the bottom of loop and still can't move. You should give it a try, please
×
×
  • Create New...