Jump to content

ghoflvhxj

Members
  • Posts

    76
  • Joined

  • Last visited

Profile Information

  • Location
    South Korea(Republic of)

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ghoflvhxj's Achievements

Newbie

Newbie (1/14)

3

Reputation

1

Community Answers

  1. i'm talk about something different you said. look this image. if i made 'link' button which parent set to 'base', general button appear. but i set 'link' button's parent to panel it appear good. no general button. i want to know how to disappear that.
  2. sorry i code at app.cpp and app.h i upload this two files. App.h App.cpp when i set btn's parent to 'gui->GetBase()' the button look wrong. but i set btn's parent to 'panel' the button look normal.
  3. I think i did what Josh said. this code make 'Link' button in scripts/menu.lua local gui = GUI:Create(context) --Create a link button GameMenu.newbutton = Widget:Button("NEW GAME",100,gui:GetBase():GetSize().y/2-60,300,20,gui:GetBase()) GameMenu.newbutton:SetString("style","Link") GameMenu.newbutton:SetAlignment(1,0,0,0) GameMenu.options = Widget:Button("OPTIONS",100,gui:GetBase():GetSize().y/2-10,300,20,gui:GetBase()) GameMenu.options:SetString("style","Link") GameMenu.options:SetAlignment(1,0,0,0) GameMenu.quit = Widget:Button("QUIT",100,gui:GetBase():GetSize().y/2+40,300,20,gui:GetBase()) GameMenu.quit:SetString("style","Link") GameMenu.quit:SetAlignment(1,0,0,0) i write this code in c++. gui = Leadwerks::GUI::Create(Leadwerks::Context::GetCurrent()); Leadwerks::Widget* base = gui->GetBase(); btn_start = Leadwerks::Widget::Button("start", 100, 100, 100, 50, base); btn_start->SetString("style", "Link"); Could i know what i did worng?
  4. gui = Leadwerks::GUI::Create(Leadwerks::Context::GetCurrent()); Leadwerks::Widget* base = gui->GetBase(); btn_start = Leadwerks::Widget::Button("start", 100, 100, 100, 50, base); btn_start->SetString("style", "Link"); hi. I'm trying to make UI that will apply to my game. but, it does not work out from beginning. haha I had make simple 'Link' button. but it looks wrong. how can i fix it? I would appreciate your reply.
  5. ok, here is my code. bool Player::Pick() { //if player grab the entity, return true. if (pick_state == PICK_UP) return true; pick_state = PICK_EMPTY; pick_image = nullptr; if (!camera->Pick(context_halfwidth, context_halfheight, pickinfo)) return false; pick = pickinfo.GetEntity(); std::cout << pick->GetClassNameA() << " " << classname << std::endl; std::cout << pick->GetPhysicsMode() << " " << physics << std::endl; std::cout << pick->GetCollisionType() << " " << collision << std::endl; if (window->KeyDown(Leadwerks::Key::R)) { Leadwerks::Vec3 a = Leadwerks::Transform::Point(pickinfo.position, pick, nullptr); t->SetPosition(a); } //Check classname, physicsmode, collisiontype if (pick->GetClassNameA() != "Model" || pick->GetPhysicsMode() != Leadwerks::Entity::RigidBodyPhysics || pick->GetCollisionType() != Leadwerks::Collision::Prop) return false; //Check distance and mass if (pick->GetDistance(character) > pick_distance_limit || pick->GetMass() > pick_mass_limit) return false; pick_state = PICK_PICK; pick_image = hand_pick; return true; } void Player::PickUp() { //Check distance if (pick->GetDistance(character) > pick_distance_limit) { PickInit(); return; } //if the entity's first pick if (pick_state == PICK_PICK) { pick_mass = pick->GetMass(); //Transformation of the pick position from localspace to globalspace. Leadwerks::Vec3 pick_pos = Leadwerks::Transform::Point(pickinfo.position, pick, nullptr); //Create joint pick_joint = Leadwerks::Joint::Kinematic(pick_pos.x, pick_pos.y, pick_pos.z, pick); pick_joint->SetFriction(1000, 10000 - pick_mass * pick_mass * 10); joint_target_pos_gap = pick->GetPosition(true) - pick_pos; } else { Leadwerks::Vec3 camera_target_pos = camera_pivot->GetPosition(false); camera_target_pos.z += 1.2; camera_target_pos = Leadwerks::Transform::Point(camera_target_pos, camera_pivot, nullptr); //Joint work Leadwerks::Vec3 joint_target_pos = camera_target_pos + joint_target_pos_gap; pick_joint->SetTargetPosition(joint_target_pos, 1.0f - (pick_mass * 2.0)/100); } pick_state = PICK_UP; pick_image = hand_grab; } Additionally, the ClassName of the entities in the video are "Model", "PhysicsMode" is "RigidBodyPhysics" and "CollisionType" is "Prop". And, the entitiy that did not 'pick' from 10 to 25 seconds of video were 'pick' after the collision at 27sec.
  6. Hello guys. please look this video. I could not pick some entities. why?
  7. "Error: No debugger hostname supplied in command line." The output directory and working directory same directory as "$(SolutionDir)..\..\" But it still remains. I do not have a big problem working, but I want to fix it. How do i fix this erorr?
  8. Thank you Josh. Perhaps, Leadwerks Engine is there any plan to support Hangul font?
  9. Hi guys. I tried to add some font(korean) in my project a few hours ago but i didn't get good result. I think leadwerks engine doesn't surpport korean font. What can i do to use korean font?
  10. Hi guys. I was making a trigger which, lead to death of an object, if collision with it occur. For example, there is a variable named 'health' in the MonsterAI.lua. i wrote SimpleTrigger.lua like this. Script.Enemy1pfb = "" --path "Enemy1" " Pfb file (.*pfb):pfb|Prefabs ----------------------------------------------------------------------------------------- self.enemy = Prefab::Load(self.Enemy1pfb) self.enemy.health = 0 Loading was perfect but i could not access to health. What should ㅑ do?
  11. Thanks for your reply. By the way, Did you know why speed parameter have 0?
×
×
  • Create New...