Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. ( LUA ) Seems to be missing - self.sprite_ledgemarker:SetViewMode(SPRITEVIEW_BILLBOARD)
  3. Today
  4. Oh okay, I thought maybe both did the exact same thing. How would I align a matrix to a vector?
  5. The entity method takes roll into account, and tries to make the best decision. The Mat4 method is simpler.
  6. It may. Aligning an object to a vector is an ambiguous operation.
  7. Thankyou. But should this code give two different results? auto m = Mat4(); m.MakeDir(Vec3(0.0f, 0.0f, 1.0f), 1); Print("Mat4"); Print(WString(m[0])); Print(WString(m[1])); Print(WString(m[2])); Print(WString(m[3])); Print("Quat"); auto q = m.GetQuaternion(); Print(WString(q)); Print("Euler"); auto r = q.Euler(); Print(WString(r)); Print(""); Print("--------------------------------------------------------------"); Print(""); auto up_pivot = CreatePivot(nullptr); up_pivot->AlignToVector(Vec3(0.0f, 0.0f, 1.0f), 1); m = up_pivot->GetMatrix(); Print("Mat4"); Print(WString(m[0])); Print(WString(m[1])); Print(WString(m[2])); Print(WString(m[3])); Print("Quat"); q = m.GetQuaternion(); Print(WString(q)); Print("Euler"); r = q.Euler(); Print(WString(r)); Console Output. Mat4 1, -0, -0, 0 0, 0, 1, 0 0, 1, 0, 0 0, 0, 0, 1 Quat -0, -0, 0, 0.707107 Euler 0, -0, -0 -------------------------------------------------------------- Mat4 0, 1, -0, 0 0, 0, 1, 0 1, -0, -0, 0 0, 0, 0, 1 Quat -0.5, -0.5, -0.5, 0.5 Euler -0, 90, 90
  8. Is this after calculating GI or after loading the scene from a file?
  9. I think those are the mipmaps, being fed into the wrong position.
  10. I can't find any thread about this issue, but I remember talking about it in last week's meeting. I was able to produce the error in @Andy90's program, but in a new project the error did not occur: Do you think there might be some code you added that could be causing this?
  11. Use mat.GetQuaternion() to get the exact rotation.
  12. Oh, I think I know why. It's pointing straight down, so you activated Gimbal lock.
  13. Strange...you would expect a lot of problems if these functions were off... Mat4 m; m.MakeDir(Vec3(0, 0, 1), 1); Print("Mat4"); Print(WString(m[0])); Print(WString(m[1])); Print(WString(m[2])); Print(WString(m[3])); Print("Quat"); auto q = m.GetQuaternion(); Print(WString(q)); Print("Euler"); auto r = q.Euler(); Print(WString(r));
  14. I'm not positive I'm using it right... but no matter what I do the matrix's rotation (r) is always zero. Where as (i) is correct - Vec3(0,90,90); MakeDir() returns nothing, I checked. auto m = Mat4(); m.MakeDir(Vec3(0,0,1), 1); up_pivot->AlignToVector(Vec3(0,0,1), 1); auto i = up_pivot->GetRotation(); auto r = m.GetRotation();
  15. I'm using this code to align a pivot to the up direction of my player controller. up_pivot->AlignToVector(up_direction, 1); target_quat = target_quat.Slerp(up_pivot->GetQuaternion(), 0.1f); kinematic_joint->SetPose(pos, target_quat); The video below shows it working really well when the forward direction is along the X axis (red arrow in the distance). However when moving back and forth along the z axis player spins 90 degrees to face the (+) X axis when the up vector is something like Vec3(0.0f, 0.0f, 1.0f) or Vec3(0.0f, 0.0f, -1.0f). You can see it at around 25 seconds into the video. I know this is a by product of aligning to a vector, but what I'm wondering is - is there is a way to align to an up vector as well as a forward vector? This way I think my player rotation can be more controlled when the up direction changes as I can track both up and forward vectors with ease. Matrix math perhaps?
  16. See void Mat4::MakeDir(const Vec3& dir, const int axis)
  17. 0.9.6 Today's fixes are uploaded...
  18. You mean like a render hook that displayed the inventory when the capture was ready for the inventory shader to use?
  19. This would not be too difficult to do, if you just had a hook that got called in the right place...
  20. Not really, I want to capture a screen shot before I open my inventory and then use that result as a background for my inventory that will be blurred. Like the window transparent effect in the editor. It won't be real time but that's fine. I'm just worried about spending the time waiting for the capture to be ready as a pixmap and then going through all the conversion and re-upload to the GPU when it's already there.
  21. Can't you just use camera->SetRenderTarget to render to a texture?
  22. I have a collection of 57 high quality rock models I have permission to include with Ultra. However, they need LODs and colliders created. The convex hull / convex decomposition tool will work fine, no need to model new colliders by hand. I also have some trees, some of which can be used as-is, but with many of them we want to try to remodel it using what we have learned recently about making game trees. Anyone interested in working on these? It will work better if you have Unwrap3D, MantisLOD, and maybe Gigapixel AI for some upscaling. The results will be freely available to all Ultra users.
  23. I had to change the way hooks are inserted into the object info. In the next build, this example will work: #include "UltraEngine.h" using namespace UltraEngine; struct MyObject : public Object { int count{ 0 }; static void Hook(shared_ptr<Object> source, shared_ptr<Object> extra) { auto world = source->As<World>(); auto o = extra->As<MyObject>(); o->count++; Print(o->count); } }; int main(int argc, const char* argv[]) { //Get the display list auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1920, 1080, displays[0], WINDOW_CLIENTCOORDS | WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); auto o = std::make_shared<MyObject>(); world->AddHook(HOOKID_UPDATE, MyObject::Hook, o); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); Sleep(1000); } return 0; }
  24. Josh

    Build 785

    Both issues are fixed.
  1. Load more activity
×
×
  • Create New...