Jump to content

Genebris

Members
  • Posts

    517
  • Joined

  • Last visited

Posts posted by Genebris

  1. That blog post doesn't mention animations or skinning, which is probably the issue. I never could run more than a couple of characters in Leadwerks.

    You should probably try stopping all animations or deleting all the bones in your scene to check if it's because of animations.

  2. I don't know why it produces and error, but you can always use the good old classic way:

    Math:Random(0,20) -10

    Also, this is Leadwerks API method and Lua has it's own

    math.random

    Might be different, IDK.

  3. I might be wrong here, but this is how I understand it. Prefab:Load returns object of a class Entity. But that class doesn't have a method Play. Only it's subclass Emitter has a method Play.

    https://www.leadwerks.com/learn?page=API-Reference_Object_Entity

    Maybe if you define the variable as Emitter first, and then load prefab into it, it remains as Entity class, I don't know. And you can also cast your Entity object to Emitter object. I think like this:

    entity = tolua.cast(entity,"Emitter")

     

  4. Yeah, documentation must be really confusing for new users, you are not the only person who had trouble with this recently. I suggest you just go off of example projects, they should have everything you need to make a basic game.

     

    Notice how character controller and prop controller are different things and use different methods to move. I suggest you start with character controller while you learn and rely on FPS example.

    • Thanks 2
  5. You can't use entity:Move for the character, it's only for non physical objects because it ignores collision. For character, you use enitity:SetInput. Look how character is done in FPS example project. You can also see how walls and platforms are set up there.

    self.entity:SetInput(self.camRotation.y, playerMovement.z, playerMovement.x, jump , false, 1.0, 0.5, true)

    https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetInput

     

     

    You don't need to do SetGravityMode, all you need is static boxes with scene type and correct character movement script.

    • Thanks 2
  6. Using scene collision type is correct. The character controller isn't able to slide on it's own, you need to use prop type if you want it sliding on an angled platform.

    I don't know why it doesn't collide with walls, you should record a video and attach your character script.

    • Thanks 2
  7. First, I don't think Turn and Move are allowed for physics objects. It was PhysicsSetPosition before, but then Josh implemented something else:

    On 9/27/2018 at 6:31 AM, Josh said:

    If you are continually changing the position of an object each frame, it will break the physics simulation each time.

    PhysicsSetPosition() was an old command that has been left in for backwards compatiblity, but is removed from the documentation because a better method has been implemented. The kinematic joint will allow you to precisely control the orientation of an object with physics forces:
    https://www.leadwerks.com/learn?page=API-Reference_Object_Joint_Kinematic
    https://www.leadwerks.com/learn?page=API-Reference_Object_Joint_SetTargetPosition
    https://www.leadwerks.com/learn?page=API-Reference_Object_Joint_SetTargetRotation

     

    Also, do you use character controller? I think you should since this is your character. It will allow AI to navigate to you. With character physics mode you use this method: https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_SetInput

    You can find how it's used in default FPS character example.

     

    • Upvote 1
  8. How do you know they are the same world? Maybe System:Print gives you the same output for different worlds. Try to spawn something in one world and render another.

     

    Also, what if you do this?

    mundo1 = CWorld:Create()
    System:Print(mundo1.worldx)
    
    mundo2 = CWorld:Create()
    System:Print(mundo2.worldx)

     

    • Like 1
  9. On 7/21/2021 at 3:43 AM, Josh said:

    I think you are paying way too much attention to a detail that does not matter. I see this effect happening in AAA games, and like I said, it's due to your old graphics card and the average user isn't going to have the same problem.

    1050ti is the second most popular card on Steam so you can't just say that it's old and irrelevant. Also, I've never seen this effect in any decent game on this videocard.

    I think this is a serious issue. Hopefully it gets better in Ultra Engine, otherwise I'll have to implement something else for culling.

    • Like 1
×
×
  • Create New...