-
Posts
710 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Slastraf
-
The rotation is set like this - during runtime the entity of the script makes a new pivot on itself and set itself as child of the new pivot - this new pivot points at the target point so it eliminates two axis of rotation - to set the x rotation of the leg the two bones are determined and a triangle with base from leg origin to target is made. - then from the length of the origin of the leg to the knee, and from the length knee to the target, the other two sides are determined. - with that there is enough information to calculate two angles, one of the upper leg and lower child leg and set. (something with arccos) For the latter, I am confident they are calculated correctly because one of the leg works when inverted. For the leg with bone, I already tried to store offset rotation at start and add it to the calculated rotation with weird outcome. When I modeled the leg I tried to keep it as clean as possible. Everything that came out was not avoidable.
-
You need to reset the targetPoint to sphere_Far and Sphere 1 as in the screenshots. It was in the map data but probably lost when you opened it somehow.
-
-
Try it in the fps template, it has the fps player in there
-
Thanks for trying. Is there any fix ?
-
Yes I hope it was everything. spiderLegFiles.zip
-
Yes I have used both now and they have the same result. I thought SetQuaternion was going to fix it but it didn't.
-
I have converted the script and tried to make a lot of adjustments, but so far have not been able to accurately replicate rotation of an already working model without bones. The script is uploaded here, but I don't know why the model with bone (not the green +yellow one) is still acting strangely. It seems to not track the target blue sphere accurately. I have uploaded the bone model before. Really would like to proceed with normal development speed but I sit on this sole issue for two days now and really don't know any fix. //edit In the video the model with bone has 3 "parts" of the leg but the rock box should be on the same position as the blue sphere oldSpiderLeg.lua
-
Last time I tried to use that it crashed on me. But that was years ago and maybe I had the actual notes.txt or whatever it is importing in some other folder and maybe it crashed because of that.
-
Creating hills + terrain + paint from script
Slastraf commented on Marcousik's blog entry in Marcousik's Creations Blog
You can add multiple gradient noise generators to make different type of height maps. You can also subtract height gradually more at the edges and make an island generator. In the library I used I used only one perlin noise, with different octaves and frequency of details in it. if you have less frequency hills will get larger on xz and if you have higher octaves you can get more hills and holes. //EDIT You can also generate Biomes / textures with https://en.wikipedia.org/wiki/Voronoi_diagram Voronoi. basically use one texture ant interpolate between them. -
Oh, I thought you needed a W also but it does work like that. This needs to be in the documentation
-
Here a minimally tested lua funciton to convert from Euler to Quat in LE source http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/index.htm function eulerToQuat(x,y,z) --Assuming the angles are in radians. local c1 = Math:Cos(x*0.5); local s1 = Math:Sin(x*0.5); local c2 = Math:Cos(y*0.5); local s2 = Math:Sin(y*0.5); local c3 = Math:Cos(z*0.5); local s3 = Math:Sin(z*0.5); local c1c2 = c1*c2; local s1s2 = s1*s2; return Quat(c1c2*s3 + s1s2*c3, s1*c2*c3 + c1*s2*s3, c1*s2*c3 - s1*c2*s3, c1c2*c3 - s1s2*s3) --[[ w =c1c2*c3 - s1s2*s3; x =c1c2*s3 + s1s2*c3; y =s1*c2*c3 + c1*s2*s3; z =c1*s2*c3 - s1*c2*s3; --]] end
-
Yeah that pointed me in the right direction, but still not the desired outcome. i will not get a $70 textbook on that so I need to rely on utube now.
-
Here is the quat test file. I am pretty confident it would work normally on any other thing than a bone. But have not tried it there yet. quatTest.lua
-
As far as I understand an quatof xyz = 100 is the "lookAt" vektor of the model and "W" the rotation on that axis (global euler x in that case). if it goes from 0-180 it should turn on that x axis ( It is doing just that, but it should never scale itself up. It is a bug.) The point is, neither setQuat or setRot work as they both have inpredictable outcomes. I am 99% sure that the scaling up issue is a bug so that makes quats unusable in LE currently. Can you confirm that ? 2021-04-15 18-40-56.mkv
-
I have uploaded a version in the downloads tab.
-
Here is a private video that shows different ways of rotating in Leadwerks and how they all do not work on bones from models. Moreover, I tried using quaternions to rotate the spider leg around the x axis, which worked but scaled the model up in the process for no reason. The red, green and blue are rotated on the x , y and z but none of them actually rotate around the x axis. If you set rotation to global, the outcom eis worse. I am running out of ideas. i have uploaded the spider leg mdl and fbx so you can try yourself. spider leg.zip
-
Cryptocurrency Now Accepted in Store and Marketplace
Slastraf commented on Josh's blog entry in Development Blog
Ultra Coin -
View this video Description Inverse Kinematics in Leadwerks.
-
All random number generators only produce pseudo random numbers and you can use it to your advantage because if you initialize it with a seed like "123" it will always generate the same infinite numbers for that seed. For the terrain height generation I use perlin noise which is like a controlled 2d fractal / noise. I used a cpp library for perlin noise as a height map to set the vertices height of the tiles. It can never be the same if the seed is always different for each new playtrough. But if you you use the same seed you can have the exact same world as someone else.
-
Yes I can share it, but with the seed you don't need to store it in a db because it will generate the same output every time. I will put it on in a bit. I want to add texture generation and make it more readable / stable. Its missing physics and textures basically. The player is moved by raycasts.
-
View this video Description See utube desc for more.
-
It looks like you are drawing it twice. Maybe some other value in a different script (at the position y 100 120 140)
-
The space behind the screenshot is black. Maybe there is no camera or anything to render above the "last" postrender ?
-
GetSurface will only view top level object of .mdl
Slastraf replied to Slastraf's topic in Suggestion Box
You wont be able to access the surface in a normal model