-
Posts
544 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by martyj
-
-
-
11 hours ago, gamecreator said:
While this won't help with debugging or why it's crashing, I thought you were supposed to use physics commands for physics objects, like SetOmega.
That very well could be the case, but how do we know which functions to use?
Is Entity::AlignToVector a physics function? -
I was wondering if anyone has any tips for debugging newton dynamics?
My game is crashing when I call Entity::Turn on a Model that has Rigid Phsyics, box shape, and a mass of 60.Vec3 posit = this->GetEntity()->GetPosition(true); Vec3 navPoint = this->nextNavPathPoint; posit.y = 0; navPoint.y = 0; double angle = Math::ACos(posit.Dot(navPoint)/posit.Length()); this->GetEntity()->Turn(0, angle, 0, true);
See attachment for my stack trace. I'll try workup a demo tomorrow which has the same problem.
-
Posting this information for me later:
If I need to re-write the Character Controller, this will help with navigation.https://www.leadwerks.com/community/topic/7902-navmesh-findpath/
-
I'm having CPU problems with Leadwerks in that when I use a bunch of Character Controllers for AI (Around 130) the game lags really bad.
What can I do performance wise to allow me to have a few thousand Character Controllers at once?
My render time is about 19-21.
Update time is around 520
Batch Size: Around 580
Running through a profiler NewtonDynamicsSimulation::Update uses majority of the processing time. CharacterController::AlignToGround is what looks to be like it is using a ton of CPU.
My batch size is about the same with and without the extra Character Controllers. -
With the new released version of Leadwerks Enterprise targeted towards simulation and VR, I think it would be beneficial for the expansion of this if Leadwerks supported Python.
It would be similar to how LE does Lua.
You could use Swig to generate the python classes.
http://www.swig.org/Doc1.3/Python.html#Python_nn10
I know from experience that Python is heavily used in the physics world. It's the only language they teach in my Computational Physics degree. If it's as easy as swig looks, would be a good way to produce more sales IMO.- 3
-
Force = Mass * Acceleration.
If you AddForce, you basically add an acceleration of Force/Mass. Newtons is the correct units for Force.
https://en.wikipedia.org/wiki/Newton_(unit)
The output should be in m/s^2.
So (kg*m)/s^2 = Force. Divided by Mass (kg)
You get (kg*m)/(s^2*kg)
Equals m/s^2 -
It is a CSG Box.
Good to know this is why I cannot find it. -
7 hours ago, AggrorJorn said:
Anything special about this entity? CSG brush, camera, model?
Reminder: CSG brushes are collapsed if they don't have a script or mass. Makes finding the entity impossible if that hasn't happened.
The entity that cannot be found is a Box.
The entity that can b e found is a Pivot
4 hours ago, macklebee said:App:FindEntity("EndAsdfgwg")
why are you doing App:FindEntity()? shouldn't it be 'world:FindEntity()' since you went to the trouble of finding the current world and thats the title of your topic? And are you for some reason still using the very depreciated app.lua scripting?
I've updated my sample to reflect the topic.
I wrote my own FindEntity function to try to see if there is a bug in the World's FindEntity. It just loops through the world entities calling World::GetEntity(n) and compares the name.
Both my version and the LE version have the same problem, I'd imagine they are along the same lines of code. -
After deleting that entity it drops the count to 413.
I wonder if the name isn't setting correctly. -
2 hours ago, gamecreator said:
What does world->CountEntities() return?
This returns 414
-
Here is the list of entities in my world
https://imgur.com/a/tPRa6When I run the following code in Lua, it returns NULL
local world = World:GetCurrent() CaveIn2_ATrappedMiner.boundingBox = world:FindEntity("EndAsdfgwg") if CaveIn2_ATrappedMiner.boundingBox == nil then System:Print("Null bounding box") return end
When I run the following code it returns the Entity as expected
CaveIn2_ATrappedMiner.rubble = world:FindEntity("Rubble")
When I loop through all the entities and print their name, EndAsdfgwg isn't listed in the World
Any ideas as to what I am doing wrong?
-
On 10/2/2017 at 1:39 PM, gamecreator said:
Since this would all be client to client, except for the special world items, we have to assume that no one will hack/cheat (which I know is a bad assumption but this would be for the tournament so nothing serious).
One thing to take note is that libcurl implementation with Leadwerks does not support HTTPS at the moment.
Which means anyone running wireshark can see your traffic.- 1
-
Any suggestions on how I can fix the rotation issue in this video?
- 1
-
18 hours ago, Josh said:
Regular Lua is slower than LuaJIT but the LuaJIT project is no longer being developed and You will get more time in the game loop in Leadwerks 5 for your code to execute, since rendering and physics are performed in separate threads. LuaJIT is stuck at Lua 5.14 which does not support unicode.
Does this mean we can have an animated loading screen now?
-
On 9/13/2017 at 5:39 AM, Thirsty Panther said:
Enjoying the Spline tool.
Experimenting with a railway texture.
Now just add an Entity follower for a Train.
-
Purchased.
It was really hard to find the item in the shop.
Viewing the workshop only shows "curated" items, and not items to be purchased.
You have to navigate to the Leadwerks steam Store page, then find the item on that.- 1
-
I think I see what's going on.
It looks like when you resize the screen via Leadwerks Options menu, it doesn't resize the context. So it draws a 1280x720 image on the context, then upscales to 1920x1080, which makes it blurry? -
In the Leadwerks Editor, when I hide a parent object, it sets "Hidden" to true on all the child objects.
In code, when I set the parent object to Show() all the children do not show.
I would expect the Parent object to be Hidden() == true, but the child elements to have Hidden() == false.
That way when I call Show(), I don't have to recurse through the children. -
2 minutes ago, AggrorJorn said:
Rivers are basically already possible with the Road editor. You can already set the material. Just needs a shader for the movement and your good.
Exactly what I was thinking as well.
- 1
-
Any idea on when this will be released and for how much? I think it would be cool to make rivers with this.
-
You could also make animated characters easily using Daz3D. It's free too.
-
22 hours ago, Rick said:
Have you tried the following? Does it give an error?
I've updated the lua code to the actual Lua code, not just psudocode.
The code "Runs" but nothing is printed to the console.
If I runInterpreter::EvaluateString(std::string("System:Print(\"Test\")"));
This will print to the console.
I haven't ran it through a Lua debugger to see if ARudeAwakening::Main() gets called or not. -
I'm working on customizing quests with Lua to be more dynamic.
I'd like to be able to define a lua program via a lua file, load it via Interpreter::EvaluateFile.
After loading the file, I'd like to be able to call a "Main" function inside the file.
Something similar to the following:
----- Scripts/Quests/ARudeAwakening.lua ARudeAwakening = {} function ARudeAwakening:Main() System:Print("Main loaded") App.Quests.ARudeAwakening = self end function ARudeAwakening:UpdateWorld() System:Print("Logic Stuff") end ---- C++ Interpreter::EvaluateFile(std::string("Scripts/Quests/ARudeAwakening.lua")); Interpreter::EvaluateString(std::string("ARudeAwakening:Main()"));
How can I get something like this to work?
Terrain::GetNormal returns Vec3(0, 1, 0)
in Programming
Posted
Whenever I call GetNormal(x, z) on the Terrain object, it returns the same Vector of (0, 1, 0)
Any idea on how I can get a normal for the terrain at a given point without using Pick()?