Jump to content

tipforeveryone

Members
  • Posts

    382
  • Joined

  • Last visited

Posts 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. I thought we had avoidance with pathfinding before?

    I don't know smile.png I did not see any post before, can you show me please?

    You can try getting vector between AI and player and then add a bit of force to the normal.

    I think a small force will help him get around your collider quicker.

    Good idea, but I want this AI avoid me completely biggrin.png like this

    post-16833-0-67391300-1489166946.jpg

  3. 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...

  4. They can get closer to the wall than the navmesh shows. The navmesh represents their center, not their outer bounds.

     

    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.

  5. 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.

  6. the only thing I can think of is how maybe you are setting the value for self.room? How is that variable being set via the different rooms' triggers? If you have multiple triggers with scripts, are all the triggers' scripts checking the state of H's KeyHit? If so, that may cause problems.

     

    You are right, my "if window:KeyHit" was placed in many script, I will make more research to solve this :) thanks for your advices

×
×
  • Create New...