Jump to content

Vida Marcell

Members
  • Posts

    320
  • Joined

  • Last visited

Posts posted by Vida Marcell

  1. 4 hours ago, Josh said:

    3D viewports in windowed applications work by positioning a separate window on top of the panel you want it to appear on. The ResizeViewport() function in the example handles the window resizing.

    If GLUT creates the window, you will need to just resize the GLUT window instead of a UAK window. I don't know how GLUT windows work, but at least you can probably retrieve the HWND and use Windows system commands to position and size it.

    Now i understand! Thanks

  2. 1 hour ago, aiaf said:

    Think your best bet will be leadwerks at least until Ultra Engine will be out.

    Because is easy to use and flexible enough.

     

    Here are other options:

    Rendering engine called OGRE , but is very large and complex.

    Irrlicht Engine , old but looks simple enough.

    raylib , this one seem to match your requirements.

    Thanks for the answer, i think youre right Imma go with LW

  3. i want to make a little application with uak, but i dont want to use leadwerks or opengl either, because leadwerks is for games and opengl's code is messy, can someone recommend me a sdk that has similar code to leadwerks, but doesnt has features that used in game development? Thanks

  4. Allright, can someone tell what am i doing wrong here is a part of my code:

    //Load a prefab
    	Entity* player = Prefab::Load("Prefabs/player.pfb");
    	player->SetPosition(0, 6, 0);
    	player->SetSweptCollisionMode(true);
    
    	Camera* camera = Camera::Create(player);
    	camera->SetPosition(0, 2, 0);
    	float playerheight;
    
    	window->HideMouse();
    
    	float walk;
    	float turn;
    	float jump;
    	float jumpspeed = 8;
    	float speed;
    	bool cdown = 0;
    
    	Vec3 mouse = Vec3(0, 0, 0);
    	Vec3 velo = Vec3(0, 0, 0);
    	Vec3 camera_y = Vec3(0, 0, 0);
    
    	float mouse_x;
    	float mouse_y;
    
    	float lerp;
    
    	while (true)
    	{
    		camera->GetPosition();
    		camera_y = camera->GetPosition();
    
    		mouse = window->GetMousePosition();
    		window->SetMousePosition(window->GetWidth() / 2, window->GetHeight() / 2);
    
    		mouse_x += (mouse[0] - window->GetWidth() / 2) / 4.5;
    		mouse_y += (mouse[1] - window->GetHeight() / 2) / 4.5;
    		
    		camera->SetRotation(mouse_y, 0, 0);
    
    		walk = window->KeyDown(Key::W) *speed - window->KeyDown(Key::S) *speed;
    		turn = window->KeyDown(Key::D) *speed - window->KeyDown(Key::A) *speed;
    		speed = 5 + window->KeyDown(Key::Shift) * 2 - window->KeyDown(Key::Control) * 3.5;
    		
    		lerp = Math::Lerp(2, 0, 0.5);
    		
    		if (!window->KeyDown(Key::ControlKey) && cdown == 1)
    		{
    			cdown = 0;
    			speed = 8.0;
    			camera->SetPosition(0, 1.75, 0);
    		}
    
    		if (window->KeyDown(Key::ControlKey) && cdown == 0)
    		{
    			cdown = 1;
    			speed = 4.0;
    			camera->SetPosition(0, lerp, 0);
    		}
    
    		velo = player->GetVelocity();
    		if (velo[1] == 0.0)
    		{
    			jump = window->KeyHit(Key::Space) * jumpspeed;
    		}
    		else
    		{
    			jump = window->KeyHit(Key::Space) * 0.0;
    		}
    
    		player->SetInput(mouse_x, walk, turn, jump, cdown, 1, 1, true);
    		
    		if (window->Closed() || window->KeyDown(Key::Escape)) return false;
    		Leadwerks::Time::Update();
    		world->Update();
    		world->Render();
    		context->Sync();
    	}
    	return 0;
    }

     

  5. 1 minute ago, Charrua said:

    HI, you can attach a lua script from the editor. If you have the profesional edition and you are using VSxxx and cpp you may interact with world elements created on the editor, call lua functions in the object's script, pass parameters, receive etc.

     

    I wrote this some time ago, don't know how much outdated it may be, but perhaps it will be a starting point:

     

    Juan

    Thank you very much!

  6. 2 minutes ago, Yue said:

    The only thing I can think of is to have a beam coming out of each player's foot and these detect when the player touches the ground.  If one doesn't touch the ground depending on the leg it could trigger an animation that is one foot lower. 

    Possibly there is another better way to d

    This is smart. But i think i will focus on blending the animations. Integrating havok would help. but if someone notices it Havok will beat my ***.

×
×
  • Create New...