Jump to content

YouGroove

Members
  • Posts

    4,978
  • Joined

  • Last visited

Everything posted by YouGroove

  1. Why raycast should pick bones ? That's really strange, i expect raycast to collide wth physic volumes only. Bones are not physic objects.
  2. I call setpickmode(0) before on the dog script , it could not pick himself or am i wrong. (The crawler have only Physic character collision) I tried your script, and if i turn around the mob it finish to don't detect the player , even when i stop moving it needs some time before detecting the player. There is something weird with pick it seems. You have same code as me with two 3D points to call Pick(): if (world:Pick(posMob, posPlayer,pi, .0, true)) == false then ... So the crawler should detect the player when there is no obstacle between them every time. Why does it not works like above example ?
  3. That's really but really weird function then. Why the first point must be the same as the entity calling Pick() ? This is nowhere in the docs. I thaught it was a really general Raycast function that just needs two 3D points and detects anything between these points (like Unity and others can do). I tested changing the order world:Pick(posMob, posPlayer , pico, 5, true , Collision.Character) But it don't work better I don't think there is a simplest way to code raycast ? world:Pick(posMob, posPlayer , pico, 5, true, Collision.Character) if pico.entity == nil then self.playerVisible = "nothing" end if pico.entity ~= nil and pico.entity ~= self.target then self.playerVisible = "collision something" end if pico.entity ~= nil and pico.entity.script~= nil and pico.entity.script.teamid ~= nil and pico.entity.script.teamid == 1 then self.playerVisible = "collision player" end
  4. No need, i will just go lot more slowly on LE3 project now, reducing my super pressure on this project I needed and wanted to have some basic AI work ready , working and done, the problem is good AI uses Raycast for many things. I just spend so much time on that Pick() function and it looks like a simple to use function but not so trivial at final, this is very frustrating, while it was 10 minutes in Unity to code it from scratch reading docs. I conclude with LE3 pick : - the doc is not so good - there is no generic exemples usable in any situations I just need Pick() to detect the player between two points ( pick start point and end point) . Raycast in LE3 works between two points , it's not based on start point,direction and length like Unity. If you have time, download it, change the mob script and make it able to detect player when the player is on the line of sight without any obstacle (whatever is the orientation or player and mob).
  5. One again you are right. We need some alert box like : "Level geometry has changed, a rebuilt is necessary" The thread can be closed.
  6. 10 minutes to got it working in Unity, while i'm battling from some days in LE3 The code is as easy and clear and it works fine without any really strange problems like i have in LE3. GameObject taggedObject = GameObject.FindWithTag("Player"); if (taggedObject != null) { t = taggedObject.transform; rayDirection = t.position - transform.position; if (Physics.Raycast(transform.position, rayDirection, out hit, 100.0f)) { Debug.DrawLine(transform.position, hit.point,Color.blue); } } Well, i just come to reality and lower somewhat my LE3 expectations to avoid disappointements
  7. I increased the rayPick to 5 world:Pick(posPlayer, posMob, pico, 5, true , Collision.Character) Now it detects player even throught walls , and rotating the player sometimes it detects sometimes not. Who has a complete working Pick example between character and player ?
  8. EDIT : The thread can be closed. --------------------------------------- Hi, Strange , why it generates path when there is not geometry above the floor ?
  9. Yes the two points are above floor, and the two spheres allows me to view the poinst in 3D space, and they are correct posPlayer.y = posPlayer.y +1 posMob.y = posMob.y +1 self.debugSphere:SetPosition( posPlayer, true) self.debugSphere3:SetPosition( posMob, true) Main of the time i have this one responding, even when the two spheres are in their line of sight each to other one : if pico.entity ~= nil and pico.entity ~= self.target then self.playerVisible = "collision something" end When i rotate the player to be backwards the mob in it's direction i have this one responding if pico.entity ~= nil and pico.entity.script~= nil and pico.entity.script.teamid ~= nil and pico.entity.script.teamid == 1 then self.playerVisible = "collision player" end So direction is impacting the result whatever the two spheres are in the line of sight one of each other.
  10. self.entity:SetPickMode(0) is preventing that problem. It displays "Player visible" , only when the player is facing in a direction backwards ? function Script:RaycastPlayer2() self.entity:SetPickMode(0) self.debugSphere:SetPickMode(0) self.debugSphere3:SetPickMode(0) local posPlayer = self.target:GetPosition() local posMob = self.entity:GetPosition() posPlayer.y = posPlayer.y +1 posMob.y = posMob.y +1 self.debugSphere:SetPosition( posPlayer, true) self.debugSphere3:SetPosition( posMob, true) -- disable model picking local world = World:GetCurrent() local pico = PickInfo() world:Pick(posPlayer, posMob, pico, 0, true , Collision.Character) if pico.entity == nil then self.playerVisible = "nothing" end if pico.entity ~= nil and pico.entity ~= self.target then self.playerVisible = "collision something" end if pico.entity ~= nil and pico.entity.script~= nil and pico.entity.script.teamid ~= nil and pico.entity.script.teamid == 1 then self.playerVisible = "collision player" end end
  11. I have a doubt : Can pick() only find entity when the two entities are facing each other ? I expected a simple raycast line detecting anything between two points (whatever are the directions of the two points)
  12. I just expect a ray pick from A to B, when A is on line of sight to say : "VISIBLE" Perhaps some more easy to use pick() function would help, i like easy systems. How to test : Put the map on your map folder put the scripts on the forlder "Scripts/objects" Run the game, and turn your player to be back to the mob to see player visible appear. That's strange, Pick() is taking the two spheres positions to raycast, it should say ok each time these spheres are in line of sight ? debug.zip
  13. It's your point of view only. I work faster with material brushes and tools like fill shapes, and faster with layer and selections. Like some people i don't like the mess of nodes system. The susbtance engine itself costs processing, each node as a millisecond cost, the mode nodes you have the more expensive your substance will cost for the game compared to a fixed Pbr shader using bitmaps that have a constant and optimized processing cost. I tried UE4 demo with substance engine, the pre processing time was really too long and it was not running so good : try google to have feedback on it also. I'm among people not hypped about substances, the only thing i like with substance and i use sometimes , is to be able to produce textures in an easy way, but again substance designer don't have all photoshop tools for example if you want to make quickly fast drawings on normal map. Its' not as good and as fast as DDO workflow on normal maps for example. For example having to bake or deal with parameters , baking and substances things to make some erosion on corners is more complicated and not as good when you paint manually with a corrosion material on corners yourself and with pressure tablet in a way it won't look uniform as substances do. I work faster in a similar way to DDO and photoshop but in 3D coat : This was to express my opinion and how i work in a practical and faster way.
  14. Ok for navmesh, but the issue is the pick function here, the mob should see the player when the red and blue spheres are in the same line of sight. But main of the time , the text don't display the word "visible" ?
  15. It's not possible i think.
  16. Hi, i use Pick , but i don't understand why it don't work , or only few times ? I put a test map and scripts if someone have time to make the test : How to test : Put Pick.map on your "map" folder Put the two scripts in your folder "Scripts/Objects" directly Run the game, move the character near the mob, and you'll see the player is not visible even on the line of sight of the mob many times. PICK.zip
  17. You don't understand the drop down on frame rate is heavy in LE3 moving from 1024*768 to 1280*800 for a scene that is empty : Some cubes, no scripts, one dir light. While changing resolution is not impacting a lot on other 3D engines with lot more level content. Well , i'll develop the first level i'm making and we'll see how it goes or can't go.
  18. I put a new code having pick points higher than floor, but now it never returns player collision detection ? function Script:RaycastPlayer2() local posPlayer = self.target:GetPosition() local posMob = self.entity:GetPosition() posPlayer.y = posPlayer.y +1 posMob.y = posMob.y +1 self.debugSphere:SetPosition( posPlayer, true) self.debugSphere3:SetPosition( posMob, true) -- disable model picking self.entity:SetPickMode(0) self.debugSphere:SetPickMode(0) self.debugSphere3:SetPickMode(0) local world = World:GetCurrent() local pi = PickInfo() if (world:Pick(posPlayer, posMob, pi, 0, true)) == false then return 0 end -- did we hit our target? if pi.entity == self.target then return 1 end -- we hit something else return 2 end
  19. I don't understand really what is going on, that's crazy The models are in the folder and visible, they should be simple models, when placed in the level they should display in game. Or does workshop models have specific hidden rights and features we don't know anything about ?
  20. I was just syaing my laptop can run lot more demanding programs keeping 30 fps, while a simple cubic level in LE3 just runs at same speed instead of beeing higher. But i seen that LE3 keeps a solid 30 fps when increasing the level complexity , what is good. I expect a solid 30 fps at least on my desktop for the game, under 30 fps it will consider to change the game from TPS to another game style.
  21. Hi, I imported some good trees from workshop, and i placed them in the level. But running the game they are not visible. Did i miss something perhaps ? And some spice of magic
  22. Thanks : this must be the solution, as i was using some navigation system elsewhere i forgot i have to click a checkbox with LE3 The thread can be closed.
  23. I always use run mode. The drop stays at 30 fps with lot of detailled static geometry without LOD, low shadows in medium settings, LE3 is good with static models. I will test on my desktop , but the main issue is dynamic entities using a script and physics, i'll have to manage that carefully.
  24. EDIT : The thread can be closed. --------------------------------------- hi, I'm using last LE3 Beta. I imported models with physic shape generated in the model tool. When i generate the navmesh the models are ignored (the models are in top of a simple BSP cube) Is navmesh generation expecting terrain only ?
  25. I'm beginning level making assets. Modular outdoor walls : Transmission tower : Energy collector
×
×
  • Create New...