Jump to content

Schoppy0384

Members
  • Posts

    31
  • Joined

  • Last visited

Schoppy0384's Achievements

Newbie

Newbie (1/14)

3

Reputation

  1. Hi, is it possible to Hide and Show loaded Maps? , Schoppy
  2. Hi, is it possible to set an Entitys RenderPosition? In Blitz3D this was EntityOrder. The problem is when I use z-sort as Material Flag, the Model are not affect by a Light. Here are some Pictures: The Plane are pointed to the Camera. When the z-Sort Flag is false, the plane affected by the light. But I need z-Sort to Render the Plane before the Planet.
  3. Hi, another problem. After rotating the Plane, the Effect don't work. Are the VertexNormal are not rotating too?
  4. Ok, thanks all for help. I think I have the solution: //Get the Plane Normal Surface* surface = mPlane->GetSurface(0); Leadwerks::Vec3 V1 = surface->GetVertexNormal(1); //Get the Differenz between Camera and Plane Leadwerks::Vec3 V2 = camera->GetPosition() - mPlane->GetPosition(); //Normalize the Vectors V1 = V1.Normalize(); V2 = V2.Normalize(); //The Dot Product float dot = V1.Dot(V2); //ABS float dotAbsolute = Leadwerks::Math::Abs(dot); cout << dotAbsolute << endl; mPlane->SetColor(1, 1, 1, dotAbsolute);
  5. Hi, I need the Angle between a Plane and the Camera: Leadwerks::Vec3 V1 = mPlane->GetPosition(); Leadwerks::Vec3 V2 = camera->GetPosition(); // turn vectors into Normals Leadwerks::Vec3 V1n = V1.Normalize(); Leadwerks::Vec3 V2n = V2.Normalize(); //the Dot Product float dot = V1n.Dot(V2n); //And the Angle float angle = Leadwerks::Math::ACos(dot); But the Angle is not correct.
  6. Hi, is it possible to change the fontHeight? I have only found Font->GetHeight() but I need Font->SetHeight() Thanks
  7. Thank you for your Reply. I have include the lib about this manual: http://www.jenkinssoftware.com/raknet/manual/tutorial.html Before, I have start a new Leadwerks Project and that compiled without errors.
  8. Hi, I have Include the Raknet Library as described in this manual. http://www.jenkinssoftware.com/raknet/manual/tutorial.html But when I compile the Project, there are many Errors: Fehler 141 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: virtual __thiscall Leadwerks::Object::~Object(void)" (??1Object@Leadwerks@@UAE@XZ)" in Funktion ""public: virtual __thiscall Leadwerks::Vec3::~Vec3(void)" (??1Vec3@Leadwerks@@UAE@XZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 142 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: __thiscall Leadwerks::Vec3::Vec3(void)" (??0Vec3@Leadwerks@@QAE@XZ)" in Funktion ""void __cdecl `dynamic initializer for 'camerarotation''(void)" (??__Ecamerarotation@@YAXXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 143 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static void __cdecl Leadwerks::Time::Update(int)" (?Update@Time@Leadwerks@@SAXH@Z)" in Funktion ""public: virtual bool __thiscall App::Loop(void)" (?Loop@App@@UAE_NXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 144 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static float __cdecl Leadwerks::Time::GetSpeed(void)" (?GetSpeed@Time@Leadwerks@@SAMXZ)" in Funktion ""public: virtual bool __thiscall App::Loop(void)" (?Loop@App@@UAE_NXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 145 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::System::GetProperty(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetProperty@System@Leadwerks@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@V34@@Z)" in Funktion ""public: virtual bool __thiscall App::Start(void)" (?Start@App@@UAE_NXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 146 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::System::GetProperty(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?GetProperty@System@Leadwerks@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@V34@@Z)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 147 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static bool __cdecl Leadwerks::Map::Load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,unsigned __int64)" (?Load@Map@Leadwerks@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H_K@Z)" in Funktion ""public: virtual bool __thiscall App::Start(void)" (?Start@App@@UAE_NXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 148 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class Leadwerks::World * __cdecl Leadwerks::World::Create(void)" (?Create@World@Leadwerks@@SAPAV12@XZ)" in Funktion ""public: virtual bool __thiscall App::Start(void)" (?Start@App@@UAE_NXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 149 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class Leadwerks::Context * __cdecl Leadwerks::Context::Create(class Leadwerks::Window *,int)" (?Create@Context@Leadwerks@@SAPAV12@PAVWindow@2@H@Z)" in Funktion ""public: virtual bool __thiscall App::Start(void)" (?Start@App@@UAE_NXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 150 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class Leadwerks::Camera * __cdecl Leadwerks::Camera::Create(class Leadwerks::Entity *)" (?Create@Camera@Leadwerks@@SAPAV12@PAVEntity@2@@Z)" in Funktion ""public: virtual bool __thiscall App::Start(void)" (?Start@App@@UAE_NXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 151 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class Leadwerks::Window * __cdecl Leadwerks::Window::Create(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int,int,int,int)" (?Create@Window@Leadwerks@@SAPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHH@Z)" in Funktion ""public: virtual bool __thiscall App::Start(void)" (?Start@App@@UAE_NXZ)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 152 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int const Leadwerks::Key::Escape" (?Escape@Key@Leadwerks@@2HB)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 153 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int const Leadwerks::Key::A" (?A@Key@Leadwerks@@2HB)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 154 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int const Leadwerks::Key:" (?D@Key@Leadwerks@@2HB)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 155 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int const Leadwerks::Key::S" (?S@Key@Leadwerks@@2HB)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 156 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int const Leadwerks::Key::W" (?W@Key@Leadwerks@@2HB)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 157 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int const Leadwerks::Map::LoadScripts" (?LoadScripts@Map@Leadwerks@@2HB)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 158 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int const Leadwerks::Window::Titlebar" (?Titlebar@Window@Leadwerks@@2HB)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\App.obj RakNetTEST Fehler 159 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""void __cdecl Leadwerks::Print(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Print@Leadwerks@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 160 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::String(int)" (?String@Leadwerks@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 161 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::String::Right(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?Right@String@Leadwerks@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@H@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 162 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::String::Left(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?Left@String@Leadwerks@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@H@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 163 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::String::Lower(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Lower@String@Leadwerks@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 164 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static int __cdecl Leadwerks::String::Int(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Int@String@Leadwerks@@SAHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 165 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::FileSystem::ExtractExt(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?ExtractExt@FileSystem@Leadwerks@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 166 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::FileSystem::StripAll(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?StripAll@FileSystem@Leadwerks@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 167 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static int __cdecl Leadwerks::FileSystem::GetFileType(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned __int64)" (?GetFileType@FileSystem@Leadwerks@@SAHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_K@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 168 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class Leadwerks::Directory * __cdecl Leadwerks::FileSystem::LoadDir(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?LoadDir@FileSystem@Leadwerks@@SAPAVDirectory@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 169 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Leadwerks::FileSystem::GetAppDataPath(void)" (?GetAppDataPath@FileSystem@Leadwerks@@SA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 170 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static bool __cdecl Leadwerks::FileSystem::CreateDir(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?CreateDir@FileSystem@Leadwerks@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 171 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static bool __cdecl Leadwerks::System::SaveSettings(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?SaveSettings@System@Leadwerks@@SA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 172 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static bool __cdecl Leadwerks::System::LoadSettings(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadSettings@System@Leadwerks@@SA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 173 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static void __cdecl Leadwerks::System::ParseCommandLine(int,char const * * const)" (?ParseCommandLine@System@Leadwerks@@SAXHQAPBD@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 174 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static void __cdecl Leadwerks::System::Print(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?Print@System@Leadwerks@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion ""void __cdecl DebugErrorHook(char *)" (?DebugErrorHook@@YAXPAD@Z)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 175 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static void __cdecl Leadwerks::System::AddHook(int,void *)" (?AddHook@System@Leadwerks@@SAXHPAX@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 176 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static class Leadwerks::Package * __cdecl Leadwerks::Package::Load(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?Load@Package@Leadwerks@@SAPAV12@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0_N@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 177 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static bool __cdecl Leadwerks::Interpreter::LoadBreakpoints(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?LoadBreakpoints@Interpreter@Leadwerks@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 178 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static bool __cdecl Leadwerks::Interpreter::Connect(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int)" (?Connect@Interpreter@Leadwerks@@SA_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HH@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 179 error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: static bool __cdecl Leadwerks::Interpreter::Disconnect(int)" (?Disconnect@Interpreter@Leadwerks@@SA_NH@Z)" in Funktion "_main". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 180 error LNK2001: Nicht aufgelöstes externes Symbol ""public: static int Leadwerks::System::DebugErrorHook" (?DebugErrorHook@System@Leadwerks@@2HA)". C:\Leadwerks3.1\Projects\RakNetTEST\Projects\Windows\main.obj RakNetTEST Fehler 181 error LNK1120: 39 nicht aufgelöste Externe C:\Leadwerks3.1\Projects\RakNetTEST\\RakNetTEST.debug.exe RakNetTEST Does anyone an Idea where is the Error? Thanks.
  9. Hi, does anyone have an idea how to implement an Planet Glow Effect like this picture?
  10. Ok, first i calculate the new Planet Positions with: //calculate the planet Position yaw = yaw + 0.5; float ny = Math::Sin(soll_pitch) / Math::Cos(soll_pitch); float nx = Math::Sin(yaw); float nz = Math::Cos(yaw); then normalize //normalize vector float factor = sqrt(nx*nx + ny*ny + nz*nz); nx = nx / Math::Abs(factor); ny = ny / Math::Abs(factor); nz = nz / Math::Abs(factor); and last position planetSphere->SetPosition(nx*planetDistancetoSun, 0, nz*planetDistancetoSun); this works for the X and Z Axis. But now I would like calculate the Y Axis like 45° or another °.
  11. Hi, for my Project, I must calculate the Sphere Position with Sin and Cos on the x/y/z axis. There is a Error in the Orbital Inclination calculation. My Math in Sin and Cos are not so good ;-) Ok, i can use a Pivot and the move and turn Commands, but I need the calculation for later work without the Models. Here are my Code: #include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } Vec3 camerarotation; #if defined (PLATFORM_WINDOWS) || defined (PLATFORM_MACOS) bool freelookmode=true; #else bool freelookmode=false; #endif Model* sunSphere = NULL; Model* planetSphere = NULL; float planetDistancetoSun = 5.0; float pitch = -45.0; float yaw = 0.0; float soll_pitch = 0.0; bool Orbital_inclination; bool App::Start() { Orbital_inclination = false; //Create a window window = Leadwerks::Window::Create("OrbitInc"); //Create a context context = Context::Create(window); //Create a world world = World::Create(); //Create a camera camera = Camera::Create(); camera->Move(0,2,-10); //Hide the mouse cursor window->HideMouse(); //std::string mapname = System::GetProperty("map","Maps/start.map"); //Map::Load(mapname); //Create a Light Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); //Create Sun Sphere sunSphere = Model::Sphere(); sunSphere->SetColor(1.0, 1.0, 0.0); sunSphere->SetScale(2.0,2.0,2.0); //Create Planet Sphere planetSphere = Model::Sphere(); planetSphere->SetColor(0.0, 0.0, 1.0); //Move the mouse to the center of the screen window->SetMousePosition(context->GetWidth()/2,context->GetHeight()/2); return true; } bool App::Loop() { //Close the window to end the program if (window->Closed()) return false; //Press escape to end freelook mode if (window->KeyHit(Key::Escape)) { if (!freelookmode) return false; freelookmode=false; window->ShowMouse(); } if (freelookmode) { //Keyboard movement float strafe = (window->KeyDown(Key:) - window->KeyDown(Key::A))*Leadwerks::Time::GetSpeed() * 0.05; float move = (window->KeyDown(Key::W) - window->KeyDown(Key::S))*Leadwerks::Time::GetSpeed() * 0.05; camera->Move(strafe,0,move); //Get the mouse movement float sx = context->GetWidth()/2; float sy = context->GetHeight()/2; Vec3 mouseposition = window->GetMousePosition(); float dx = mouseposition.x - sx; float dy = mouseposition.y - sy; //Adjust and set the camera rotation camerarotation.x += dy / 10.0; camerarotation.y += dx / 10.0; camera->SetRotation(camerarotation); //Move the mouse to the center of the screen window->SetMousePosition(sx,sy); } if (window->KeyHit(Key:)) { if (Orbital_inclination == false) { Orbital_inclination = true; } else { Orbital_inclination = false; } } Leadwerks::Time::Update(); //calculate the planet Position yaw = yaw + 0.5; float ny = Math::Sin(soll_pitch) / Math::Cos(soll_pitch); float nx = Math::Sin(yaw); float nz = Math::Cos(yaw); //calculate the Orbital_inclination if (Orbital_inclination) { float ist_yaw = Math::Mod(yaw,360); float p_weg = (ist_yaw * 100.0) / 360.0; float winkelWeg = (2 * pitch); if (winkelWeg < 0) { winkelWeg = -1 * winkelWeg; } //calculation from the first 180 degrees soll_pitch = -(winkelWeg / 2) + (p_weg *(winkelWeg * 2)) / 100; //calculation from the second 180 degrees --- not correct !!!!!!!!!! if (ist_yaw > 180.0) { soll_pitch = -(winkelWeg / 2) - (p_weg *(winkelWeg * 2)) / 100; } } //normalize vector float factor = sqrt(nx*nx + ny*ny + nz*nz); nx = nx / Math::Abs(factor); ny = ny / Math::Abs(factor); nz = nz / Math::Abs(factor); planetSphere->SetPosition(nx*planetDistancetoSun, ny*planetDistancetoSun, nz*planetDistancetoSun); world->Update(); world->Render(); context->SetBlendMode(Blend::Alpha); context->SetColor(1, 1, 1); context->DrawText("Press Key O for Oribital Inclinaton", 2, 2); if (Orbital_inclination) { context->DrawText("Oribital Inclinaton: 1" , 2, 20); } if (!Orbital_inclination) { context->DrawText("Oribital Inclinaton: 0", 2, 20); } context->SetBlendMode(Blend::Solid); context->Sync(false); return true; }
  12. Hi, thank you Shadmar for your reply. Here are my problem. Have you an Idea to solve this problems? Thanks Schoppy
  13. Hi, first, Thanks shadmar for the great Glow Shader. I need this Shader on a Plane with an Alpha Texture. The Problem is, that the Glow Shader only works with the Solid Blend Mode. Is it possible to use the Glow Shader with the Alpha Blend Mode? Thanks. Schoppy
×
×
  • Create New...