diedir Posted August 17, 2010 Share Posted August 17, 2010 Hi all does "setcallback" working in LUA ? I need to know if and when/where the bullet i throwed, touch another entity (body). if someone could post some lines of a simple sphere touching a cube, with the callback generated, it would be great. thanks everybody have nice day Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11 Link to comment Share on other sites More sharing options...
Rick Posted August 17, 2010 Share Posted August 17, 2010 I have been asking for this for a long time. As far as I know it doesn't. Unless Josh added this in the last 3 months. Not having this functionality hurts because it makes triggers in Lua very static. ie. you can't create a body in Lua directly and get collision notification via a callback. Quote Link to comment Share on other sites More sharing options...
diedir Posted August 17, 2010 Author Share Posted August 17, 2010 Ha ! thank Rick for your answer that is what i understood from your previous posts. it is bad news for me Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11 Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 19, 2010 Share Posted August 19, 2010 ah the 'callback' issue. i don't think this will ever be resolved. This has been asked numerous times by users like rick and me but unfortunately: nothing. Triggers could be made so easily with this enabled. Especially since you can link objects together. The only thing you can do now is either use 'Enity distance' or a static object. http://leadwerks.com/werkspace/index.php?/topic/2069-solids-instead-of-collision-callback/page__p__18802__hl__triggers__fromsearch__1#entry18802 Quote Link to comment Share on other sites More sharing options...
Rick Posted August 19, 2010 Share Posted August 19, 2010 It's so frustrating. With such a simple thing so much could be accomplished. So many things rely on volume triggers in games. Distance triggers have some flaws and static triggers are just hacky. Lua functions from the editor are currently being called, so it shouldn't be a big deal to get this working. Just store off a Lua function name with an entity and when that entity gets a collision call the Lua function name passing in the information. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 20, 2010 Share Posted August 20, 2010 think of all the posibilities: sound zones trigger zones death zones damage zones block player zones gravity fields (or a force field in general) special environment zone (local fog) AI and path blocking zone surface climbing zone (ladders, rocks, ivy roots) water volume When you think of it this is just a major flaw!! I mean this is practically preventing you from setting up easy gameplay mechanics. Take a look at your PI game scripts Rick. What would you be able to create with zones or volumes that can have collision callbacks? Quote Link to comment Share on other sites More sharing options...
Rick Posted August 20, 2010 Share Posted August 20, 2010 Yeah, pretty much everything you just posted and probably more. Like you said this is a major flaw. It's just another not finished thing. I would have had all those Thingoids out a long time ago if we had this which could have lead to a ton of gameplay videos instead of just a bunch of pretty screenshots. It makes me sick to even think about the possibilities that are missed because of this one flaw. Maybe we should really push this subject again? It can't be all that bad to get this implemented inside the editor/engine. You basically just store off a string (Lua function name) with an entity, and when the collision happens on that entity see if it has a Lua function string name and if so call it, passing the parameters. The potential that this can have is huge! Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 20, 2010 Share Posted August 20, 2010 I see you guys made already a topic in the feature request forum. for those that want to see the topic: http://leadwerks.com/werkspace/index.php?/topic/2616-lua-collision-callback/page__pid__24105#entry24105 Quote Link to comment Share on other sites More sharing options...
Rick Posted August 20, 2010 Share Posted August 20, 2010 I had to give it another try. I know in the past Josh has said he wanted to do this, so I thought maybe he's forgotten about it. I just hope it doesn't have to wait until 3.0. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 24, 2010 Share Posted August 24, 2010 now it is just waiting for josh to add it to le and letting us know that it is there. Can't wait to build me some good old triggers! Quote Link to comment Share on other sites More sharing options...
Rick Posted August 24, 2010 Share Posted August 24, 2010 Any bets on how long this will take? I'm not holding by breath but maybe he'll surprise me. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 24, 2010 Share Posted August 24, 2010 I say aprox 1 week and 5 days as of today. Quote Link to comment Share on other sites More sharing options...
macklebee Posted August 24, 2010 Share Posted August 24, 2010 +8 months from when it was originally brought up... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
AggrorJorn Posted August 25, 2010 Share Posted August 25, 2010 lol, but you are right! Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 2, 2010 Share Posted September 2, 2010 Besides callbacks, It has been mentioned a couple of times, that the engine would make use of sollids. Any word on this? Quote Link to comment Share on other sites More sharing options...
Rick Posted September 2, 2010 Share Posted September 2, 2010 What do you mean by solids? You mean like something like 3DWS? You could kind of do that right now with Thingoids, it just wouldn't be the easiest to manipulate the cubes since it would have to be done via text properties instead of dragging edges and such. Although you might be able to write a separate editor that connects to the LE Editor that shows the 2D version of the scene and allows you to construct these primitives. Quote Link to comment Share on other sites More sharing options...
Pancakes Posted September 3, 2010 Share Posted September 3, 2010 this thread is like the Rick and Aggror clubhouse Quote Core I5 2.67 / 16GB RAM / GTX 670 Zbrush/ Blender / Photoshop CS6 / Renoise / Genetica / Leadwerks 3 Link to comment Share on other sites More sharing options...
Rick Posted September 3, 2010 Share Posted September 3, 2010 We see the potential if a few things were implemented in Lua Quote Link to comment Share on other sites More sharing options...
diedir Posted September 3, 2010 Author Share Posted September 3, 2010 well i am not selfish or jalous, sharing the topic to all as long as interesting talk/people there ! take a beer and have a look, that's my way... Quote AMD Ryzen 5900HX - Nvidia RTX 3070 - 32 Go - 1To SSD - W11 Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 3, 2010 Share Posted September 3, 2010 In a topic where we were also discussing triggers via Lua callback, Josh mentioned it: http://leadwerks.com/werkspace/index.php?/topic/1485-more-thingoids/page__view__findpost__p__16270 Josh: Solids are the way to handle triggers and volumes. They will be exposed soon. These are better than physics-based triggers because they can be set to call an action either on a collision, or each frame, or when an entity leaves the volume. Quote Link to comment Share on other sites More sharing options...
Rick Posted September 3, 2010 Share Posted September 3, 2010 I don't know what he's talking about with that. You can have do the same with physics based. I'm guessing he's meaning doing bounding box checks with a solid shape like a cube. Honestly I'm pretty sure we can do that right now. I think that AABB function is available. We would have to check every entity against these cube shaped "solids" to see if they are in their bounding box. Then maintain the list so you can tell when they leave them also. Unity seems to use physics based objects to do this, but I guess you could do it with "solids" also. I figured it would be easier to do it with physics because I assume the physics library handles the collisions for you, and he'd just have to store some flags per entity to tell if they are still colliding each frame and when they stop colliding. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.