-
Posts
4,937 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Posts posted by gamecreator
-
-
I don't follow. If you SetVertexPosition(0, 0, 1, 0) a vertex, shouldn't that put that vertex at 1 above (Y component) the world origin, no matter what?
-
This is probably an easy one to fix: https://www.leadwerks.com/community/topic/17034-material-files-dont-show/
Also, these two are character controller related as well, if you want to tackle the same type of stuff together:
https://www.leadwerks.com/community/topic/16198-character-controller-bugsproblems-in-beta/
https://www.leadwerks.com/community/topic/15933-character-controllers-jump-height-bugged/ -
Mostly just a guess but I think the higher the speed of something, the more likely it will tunnel through an object. You can try to counteract this by making your ground thicker.
-
We can do auto in 4.6 now?
-
He's using Pro so C++, right? In his defense, the Widget and GUI documentation sections still don't have a single C++ example to go off of. Should I submit that to Bugs forum? That said, it should be very possible to handle keyboard and mouse input with Leadwerks using the Windows commands here: https://www.leadwerks.com/learn?page=API-Reference_Object_Window
You can also draw your own buttons by using DrawImage. -
Seems like that would make sense. I'm going to compare this file to another one I also created in Max that imported fine.
Edit: you're right. I created a custom shape a few days ago that was in meters and I swear I didn't change any settings (I don't even know where they are). Maybe I opened another file before that and File->Reset didn't/doesn't change the scale? Can be closed. Sorry.
Edit 2: anyone else that comes across this, go to Customize, Unit Setup, then System Unit Setup button to make sure you're working in the right scale. You don't need to resize anything, changing that setting seems to export correctly afterwards.
-
I exported the attached FBX from Max. On importing into the editor, it gets shrunk down greatly.
The attached FBX is simply a right triangle which I created with vertices at 0,0,0 0,1,1 and 0,1,0. If you open the FBX with a text editor you see the points represented like soQuoteVertices: *9 {
a: -0.5,-0.5,0,0.5,-0.5,0,0.5,0.5,0I don't know why it's off by 0.5 but whatever; the triangle is 1 wide and 1 high, just as I created it in Max. However, when I import it into the Editor and then run the code at the bottom of this post, it prints the following:
Quotevertex 0: 0.010000, -0.000000, 0.000000
vertex 1: 0.010000, 0.010000, 0.000000
vertex 2: 0.000000, -0.000000, 0.000000Any idea why? Seems like Leadwerks shrinks it to 1/100th of its size for some reason (you can't even see it in the Editor Model Viewer (which I guess could be another bug report since the Viewer doesn't zoom in properly)).
#include "Leadwerks.h" using namespace Leadwerks; Model* model; int main(int argc, const char *argv[]) { Leadwerks::Window* window = Leadwerks::Window::Create(); Context* context = Context::Create(window); World* world = World::Create(); Camera* camera = Camera::Create(); camera->SetRotation(15, 0, 0); camera->Move(0, 0, -0.3); Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); model = Model::Load("Models/triangle.mdl"); while (true) { if(window->Closed() || window->KeyDown(Key::Escape)) return false; if(window->KeyHit(Key::Enter)) { // Print vertex coordinates for(int i=0; i<((Model *)model->GetChild(0))->GetSurface(0)->CountVertices(); i++) { Vec3 vp=((Model *)model->GetChild(0))->GetSurface(0)->GetVertexPosition(i); printf("vertex %d: %f, %f, %f\n",i,vp.x,vp.y,vp.z); } } Leadwerks::Time::Update(); world->Update(); world->Render(); context->Sync(); } return 0; }
-
Posted an issue I have here (not Blender related though).
-
This is in the programming forum so I assume he's looking for how to do it by code (maybe changing terrain materials while program is running).
- 1
-
Holy ****. Be safe, best of luck. Hopefully it's just posturing and nothing happens.
- 1
-
2 hours ago, havenphillip said:
What's the one you were talking about earlier that comes with Leadwerks but doesn't look very good?
Just the one that Leadwerks activates when you add water to a scene. If you move the camera underwater, there is no blue/swaying effect at all.
By the way, shadmar uploaded a version to dropbox some months after that discussion Thirsty Panther linked. The post is here: https://www.leadwerks.com/community/topic/10334-day-and-night-cycle-shader/?do=findComment&comment=106706
I believe that's the latest version but someone let me know if that's not the case.- 1
-
I think this is the post you a referencing: https://www.leadwerks.com/community/topic/17103-infiniteviewrange-navmesh-issues/?do=findComment&comment=111417
I only noticed the strange navmesh generation by code but could easily have other negative effects. To be fair, SetWorldSize is undocumented though BuildNavMesh is official.
-
Oh ok. I'm not sure what that one is meant to do but I noticed that it's not under the Post Effects folder (if I add it to a scene in the editor, it seems to stop updating). I've been using one that shadmar shared online and possibly on the workshop.
-
To be clear, you're talking about one you found online, right (since the one that comes with Leadwerks doesn't do underwater)? Can you link to the one you're trying to use?
-
It's a post effect you can attach to your scene or active by code. Fair warning that the one that comes with Leadwerks doesn't (or didn't) have an underwater effect so it looks bad when you're underwater. You can find one I think on the workshop or on the forums from shadmar that includes that too.
-
Asset::CreateNew also works so far but when I last dealt with this I think I had some issue when I tried to assign different materials. Only copy seemed to work for that. I don't know if in that thread I didn't notice that I had an extra copy or what. Thank you for the help!
-
Thank you for the suggestion Ma-Shell. The copy trick from an entity ended up working:
Model *temp=NULL; temp=(Model *)Model::Load("Models/level/ground.mdl"); groundmodel=(Model *)temp->Copy(true); temp->Release();
It's weird to need to do this and hopefully Josh or someone else can also chime in on this but I guess I got my workaround for now.
-
My understanding of the function was that it would load a single model as a copy instead of an instance, so you could modify just that copy. It makes no sense to me for it to load 2 copies into the groundmodel variable and that I then can't even interact with the first one (if I do groundmodel->Move, for example, it only moves the second loaded model). If you do this multiple times, you'll have twice as many models as you need. And this still doesn't explain why Release doesn't release both of them. The number of entities keeps going up, every time I run that function, even though it should in theory clear both.
Edit: I'll try to see what happens if I do an entity copy instead of an entity load. Thanks for the suggestion.
-
I'm trying to load a model as a copy instead of the default instance but for some reason it loads in twice.
if(groundmodel!=NULL) { groundmodel->Release(); groundmodel=NULL; } printf("entities before: %d\n",world->CountEntities()); groundmodel=(Model *)Model::Load("Models/level/ground.mdl")->Copy(true); // groundmodel=(Model *)Model::Load("Models/level/ground.mdl"); printf("entities after: %d\n",world->CountEntities());
However, if I comment out the Copy line and uncomment the one below it (instance load), it works as expected. Is this a bug or am I doing something wrong?
-
I think there was a thread on this before; don't know if you already searched.
-
Oh, I thought you meant just visually.
-
You can do that in the editor under View, Show Navigation.
-
I don't know your specifics but recently I had a crash when I loaded a different model in my game. The issue ended up being that I was trying to manipulate an attachment via code that the new model didn't have. In other words, make sure you're not trying to access a model (like a gun) that your new models may not have. Just a thought; could be anything though.
-
Pretty much. You can have the client send an ID # you made up as the very first packet after they connect. If the host receives this number, it accepts the client into the game. Otherwise, it doesn't let them play. They'll still be in the lobby (I don't think a host can remove a client from a lobby) but you treat them as if they're not.
Vertex Y and -Z swapped
in Leadwerks Engine Bug Reports
Posted
Odd, especially considering that I didn't rotate the model in either Max or via code. How could it consider the model rotated by default? Is this another default Max setting thing?
Also, what's an equivalent function for global use where the rotation of the model is irrelevant? I was trying to make a Worms-type game where I raise vertices to make hills.