-
Posts
79 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Skrakle
-
-
Nope. No luck.
I could fix this in 5 seconds in uu3d but its mdl format only.
It the barbarian character from darkness awakes.
Sorry, i forgot to tell you that you also need to add model->GetCharacterControllerAngle() where you set the angle with SetInput. This is how i'm doing it since i have a lot of models that are +180 as well.
Example:
model->SetInput(model_rotation.y + model->GetCharacterControllerAngle(), move_speed, 0, 0, false, 1, 0);
-
Have you tried playing with lighting quality? I had issues with shadows too and i ended up setting the lighting to High to resolve it.
In the editor: Options > Video > Lighting Quality (High) and don't forget to set it when game starts as well: world:SetLightQuality(2)
- 1
-
Setting the character angle in the editor does not work when the character loaded in by code.
In fact it changed nothing in the editor as far as I could see.
I had this problem before, if i remember correctly, this should fix it:
self.entity:SetCharacterControllerAngle(180);
(or c++) model->SetCharacterControllerAngle(180);
-
It's one of the main reasons why i went from lua to c++ given the complexity of my game. I have so many classes and structs that for me, it would have been a nightmare to do all this in lua. As for speed penalties, i don't know, i never did any benchmark tests but i'm guessing that there might be.
-
This is most likely due to one of the Macros in that line not being defined. You would have to search the headers for the definitions of those macros (most likely WINMAPI, MMRESULT, or WINAPI) and include those files and hope that they do not have additional requirements. Since this is a part of DirectX (DirectInput), you will most likely have problems with this, nevertheless.
The error only occurs if included in a LE project. In an empty console c++ application, there are no errors and works as intended.
-
I managed to rewrite my controller classes for native support (eliminating the need for the SDL lib) for both Linux and Windows but when i include dinput.h in a LE project, the compiler is giving errors, probably because it's conflicting somewhere somehow and i haven't been able to figure out how to fix it.
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include\dinput.h(4318): error C2143: syntax error : missing ';' before '__stdcall' 1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include\dinput.h(4318): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
-
Yeah i know 20000 pivots seems extreme as a test, that was merely to demonstrate the consumption factor. Even if it's insignificant, it still good practice, especially if one day, the engine ever goes to console.
-
Hey everyone. I'm working on a level and after watching the AI tutorial multiple times, I still cant figure out how to get the AI to walk to the waypoint. Any help would be greatly appreciated.
I had the same problem at first and it was because i didn't build a navmesh for the map. If you haven't already, go to TOOLS -> Build Navmesh.
If you modify the map after that, you'll need to rebuild it again.
- 1
-
Works but that method in lua will cause the program to shut down half the time. Also, your method in lua appears to make the memory consumption go up each time. The SetLayout method doesn't do that - at least in lua.
Yeah i was afraid that might happen in lua or even in linux, i guess it's unsafe to use.
-
I just managed to make it work by releasing the window & context and re-creating them. I haven't tested it thoroughly, just wrote the code and it worked.
Obviously you should replace the windows code for getting the desktop resolution with something else.
In your loop:
if (window->KeyHit(Key::F)) { window->Release(); context->Release(); if (fullscreen == false) { RECT desktop; const HWND hDesktop = GetDesktopWindow(); GetWindowRect(hDesktop, &desktop); window = Leadwerks::Window::Create("Lands of nowhere", 0, 0, desktop.right, desktop.bottom, Window::FullScreen); } else { window = Leadwerks::Window::Create("Lands of nowhere", 70, 70, 1024, 768); } context = Context::Create(window); fullscreen = !fullscreen; return true; }
- 1
-
A pivot is an empty object and initialisation is just done one time at game start on the entity start() function, so i don't think it is some optimisation needed here.
If you read my previous post again, you'll notice that i'm not only talking about speed optimization but memory as well which is my point.
As for the pivot being an empty object, that is completely wrong, once initialized, there are objects in it are automatically initialized as well whether you're using them or not and will use extra (and unnecessary) memory...
You should do some testing before making assumptions like that.
Benefit of pivot is having having game level modifications is also more easy as you just move pivots visually, and you can't loose lot of time gathering coordinates and enter them if you had a big level with thousand platforms.
It would be anti level designer productivity
It's like i said, there are people (such as you obviously) that need to see such things visually to be more productive, i don't.
Edit:
- I initialized 20000 Vec3s and it took about 1mb of memory
- I initialized 20000 Pivots (without using or modifying them, just a simple Pivot::Create) and it took about 88mb.
I rest my case.
- 1
-
All this time i thought the problem was with my model.
I wonder if we can simply use/implement a AABB for characters and use pick.
-
I just added one in my scene, i've set a high range (20) and it does not flicker on my desktop pc. I sent it to my friend who has a laptop with an Intel Integrated Graphics and it flickers so it's no doubt on the hardware side (or driver).
-
I agree, it definitely would make it easier to setup while editing but that's a matter of preference, some people need to see things visually more than others. For me, it's a matter of memory and performance, the choice was Initializing a Pivot object with tons of properties and methods vs a single Vec3.
-
I think so. It has to do with the compiler LE is using. Anyway, do yoy (or anyone else) could tell me, how do we create now (in LE 3.5) Visual Studio Project?
You don't need to, whenever you create a new LE project, it will create a Projects\Windows sub-folder, there's a solution for Visual Studio in there.
-
Here's another version of the platform.lua with additional options.
- The entity waypoint has been replaced with multiple Vec3's allowing multiple waypoints.
- Looping. (clockwise or ping-pong)
- Pause timer between waypoints. (in milliseconds)
- Randomize starting waypoint.
Here's a video demonstration of the script in action:
https://www.youtube.com/watch?v=-1Q4qAcW40k&feature=youtu.be
- 3
-
I can't figure out on how to use the platform.lua script. The problem i'm having is with:
Script.target = "" --entity "Target waypoint"
I can't set a target entity from the editor, it's grayed out and i can't seem to manually set one, world:FindEntity is not working, probably due to the fact that the project is c++ and not lua.
-
Actually Yes that's exactly why you need to use a joint, the player wont follow the platforms position otherwise. I've created a moving platform using a slider joints and the player follows the platform where ever it goes.
Another thing to take into consideration using this method is to create a custom collision type for the platform that doesn't collide with the "Scene" else it can send it off course.
There are these scripts in the default MyGame Project.
Objects\Physics\Platform.lua
Objects\Physics\PlatformWaypoint.lua
I can get you the files if you can't find them.
Found them in Scripts/Objects/Physics, i'll check it out later.
Thanks!
-
I managed to find a way to keep the character physics updated by sending a bogus movement and cancelling it out right after. Not sure how it would affect performance but it works perfectly.
// when idling player_entity->model->SetInput(player_entity->rotation.y, 1, 0, 0, false, 1, 0.5, true); player_entity->model->SetInput(player_entity->rotation.y, 0, 0, 0, false, 1, 0.5, true);
-
Thanks for the script, it does the same thing as mine when i previously tried SetPosition instead of PhysicsSetPosition. The platform movement is smoother but the character still doesn't follow it unless i keep moving on it. Seems i need to keep the character's physics updated somehow when idling and my player script is in c++ so i'm not sure how to make this work properly.
-
I'm using a brush to make an elevator, while it goes up, it's flickering, like it's trying to drop back down, i would have thought SetGravityMode(false) would have prevented this. Is there way to eliminate this effect?
Script.Trigger_Delay = 500; --int "Triggering delay" Script.is_active = 0; Script.timer = 0; function Script:Start() self.entity:SetMass(10000) self.entity:SetGravityMode(false) self.entity:SetCollisionType(Collision.Scene) end function Script:Collision(entity,position,normal,speed) self:Activate(); end function Script:Activate() if (self.is_active == 0) then self.is_active = 1; self.timer = Time:GetCurrent() + self.Trigger_Delay; end end function Script:UpdateWorld() end function Script:UpdatePhysics() if (self.is_active == 1) then if (Time:GetCurrent() > self.timer) then local pos = self.entity:GetPosition(true); pos.y = pos.y + 0.1 * Time:GetSpeed(); self.entity:PhysicsSetPosition(pos.x,pos.y,pos.z,0.2); end end end
-
Where did you get your dwarf model btw?
It's a model from WoW that i extracted using a tool, it's used for testing only.
-
Here is the table, not sure how to change those settings. http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/collision-r778
-
Have you tried setting collision type to trigger? I just found this thread: http://www.leadwerks.com/werkspace/topic/9109-collision-response-types/
Trigger mode should only detect the collision and not apply it.
- 2
wrong way round
in General Discussion
Posted
In my example, model is an Entity.
Here's a brief example.
If you're still having issues, send me the model and i'll test it.