-
Posts
7,936 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rick
-
loaded models via lua don't get removed or move with parent.
Rick replied to AggrorJorn's topic in Programming
I hear ya man. I do a ton of visualizing of how things would be done when I'm at work. I agree with the more 'professional' statement. If you drag a model named basement into your scene you wouldn't think it would create an entire house. Plus you could never just drag the basement model in with it creating the house if you just wanted the basement because that code to load the other models would be in there. I'm not a fan of Thingoids required to have models to be able to move them around in the editor. It's a waste for more logical objects like the house you are making. -
loaded models via lua don't get removed or move with parent.
Rick replied to AggrorJorn's topic in Programming
[EDIT] Nevermind I see. I guess the only reason to use the pivot object would be if you want functionality that all your rooms would share it could all be done in that object instead of each room. But yeah, either way works. -
Aggror, you have to ask for stuff from us programmers. I think artists and designers have to stop being shy about asking for things. With thingoids now, it should be easy to ask for a specific thingoid from the programmers. I tried a community project once. I got some good help from a few artists but 0 help from any programmers. It could have been my fault but very few programmers seemed interested in helping. If some artists/designers want to make a project, I'm interested in hearing it. If it's lua based I'm more than interested in helping program some objects.
-
From what I know TEntity (and all the other entity types) is a char*. So it's storing a memory location. When you cast it to (int) I think you are getting the location in memory as an integer, but that's not the same as a pointer. So 31324672 is the memory location not an internal ID number for the object.
-
loaded models via lua don't get removed or move with parent.
Rick replied to AggrorJorn's topic in Programming
I get it. So in your modeling program you actually modeled these rooms offset from the origin. I would think allowing to position the rooms in the editor would be more flexible. Is it that big of a pain to get them lined up correctly in the editor? (I meant that as an actual question not like a smartass like it reads ) You pivot object has a gmf though right? I was under the impression that all those objects needed a gmf even if it was the small sphere. Even the lights have a gmf associated with them. If that's the case then I think a phy file is created automatically when you run the game even if you don't want it. -
The model does have physics but you are calling object.model:SetPosition on it. Calling SetPosition(), MoveEntity(), RotateEntity(), or TurnEntity() all turn the physics off for physics bodies. This is why controllers were created. Without the controller you have to call the physics methods to get a physics body to move and get physics working, and that's not the easiest to get going. This is why Josh created the controller object. He did all that coding already for us in a controller that fits most needs. Basically it means all your characters should have a controller around them. The controller is what you move around with UpdateController() and you make the model just follow the controller. Your actual character mesh then pretty much becomes a dummy object. Think of your character mesh there for the visual aspect and your controller there for the physics aspect. You move the controller around and make the mesh following it. You would animate the mesh though. The controller is just pure physics so you don't animate that.
-
Well, the first take at this didn't work so well. With no script I kind of went all over the place for 28 mins. I need to get a little more organized and split it into 10 min videos so I can load them to you tube. I'll work on it
-
When in game mode you have to position your character mesh to where the controller is. The issue is if you just use the position of the controller it'll place your mesh in the middle Y wise of the controller. So you need to subtract 1/2 the height of the controller for the Y axis and use that. self.characterModel:SetPosition(Vec3(object.controller.position.x, object.controller.position.y - (object.height/2) , object.controller.position.z)) I think the problem you have here is that you aren't creating a controller. You would want to use the controller otherwise you would need to make your own controller to get physics working and that's a decent size task.
-
loaded models via lua don't get removed or move with parent.
Rick replied to AggrorJorn's topic in Programming
That would be pretty cool. The crappy part about it though is it's pretty static. I wish the settings were more dynamic. I also wish it had a button so we could add things on the fly. For example, if you press the "Add Room" button it adds another settings section for another room to load. I think you might be limited in the placement of the rooms though, or that property box would need to be pretty elaborate to allow to place rooms anywhere. -
loaded models via lua don't get removed or move with parent.
Rick replied to AggrorJorn's topic in Programming
Ah, when I saw self.basement=LoadModel("abstract::matt_house_basement.gmf") self.basement:SetParent(self.model) it looked like he was just loading one part of the room for each editor model. I'm confused as to why would he need to load the gmf in code? Why not just have the gmf be the model he drags into the editor? -
loaded models via lua don't get removed or move with parent.
Rick replied to AggrorJorn's topic in Programming
If you hide a parent does the child get hidden also? If so that could be an issue. These models in the editor have a sphere mesh & body to them. I would think if you had enough of them it "could" produce a loss in fps that wouldn't be needed if you could just hide them. Hence you would need a ton of them, but not sure how many this would produce for him. That model in the editor isn't needed in game, just in the editor to place things. If I'm reading what he's doing right. Maybe not. -
loaded models via lua don't get removed or move with parent.
Rick replied to AggrorJorn's topic in Programming
I always just set the position of the loaded model to the editor model in the update method. -
Sweet, thank you!
-
Pixel Perfect, have you imported a model into Fragmotion, animated it, then exported and used in LE before? I personally don't mind paying $50 for this if someone has animated their models using it and had them work in LE before.
-
I think the animation part would be huge. The biggest thing this community lacks is animators and if I could learn to animate on my own I'd be willing to buy more character models that aren't animated because then at least I know I could get some form of animation out of them, even if it's crappy.
-
Niosop, was there any tutorials that helped you learn animation via Blender? I have Blender and I almost fell out of my chair the first time I opened it up because the interface is insanely complex. It almost feels to overwhelming.
-
I would love to know also.
-
I have time tonight. I'll make a video also.
-
I think you should put a setting in the character thingoid for speed. Let the users determine what they want to use per character instance. I didn't do that because I was lazy, but it's the ideal situation.
-
I pretty much have found these all suck when recording anything that is graphics intensive like a game or the LE editor.
-
I think if the editor runs at all, it should not crash when you add something. When you first start the editor is there a directional light object in your scene? By default a new scene puts that in. If that's in there then something else is happening.
-
Exactly. With being able to load dlls from lua, it just opens up so many doors and allows you not to fear the speed issue.
-
Can we get a way to get some kind of collision method called on physics bodies that we create in lua script? I feel like this is kind of a big deal. I have dynamic sized physics bodies in lua and I need to know when things collide with them.
-
I think people are scared to start using lua because they are so worried about the speed. It's honestly not bad. For me the rapid development I get from seeing my code changes instantly far out weighs the few drops in FPS.