Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Lethal Raptor Games

  • Content Count

  • Joined

  • Last visited

Everything posted by Lethal Raptor Games

  1. Yeah you could make an algorithm that gets the size of the object (probably the AABB) and won't let it get too close to the player. You would have to experiment a bit.
  2. Obviously the text editors couldn't see it, but the compiler could.
  3. Unfortunately it wasn't that simple. I don't know how it happens but sometimes the file gets corrupted. I opened the header file in a Hex Editor so I could see every byte of info and found these funny symbols (circled in red). After removing those it compiled fine
  4. Ah sorry it's how I name my class as sometimes I want a class that conflicts with Leadwerks classes. Did it work?
  5. I just got mine to compile... see if they work for you zombie.cpp zombie.h
  6. Yeah if they are being referenced by any headers/source files in the Source directory, then they have to be there too. I just moved all my source and header files to the Solution directory so every time I created a new file through VS I didn't have to manually move it to the Source folder.
  7. I don't get it, it doesn't compile for me either. Maybe there is something wrong with those files somehow. Try deleting the files completely then start again.
  8. You can iterate through them but it may just be easier to setup the collisions with the Leadwerks ones; const int HELDITEM = 10 Collision::SetResponse(COLLISION_PROP, HELDITEM, Collision::Collide); And then just call SetCollsionType() for the heldItem.
  9. Yeah there's not. After setting up those collisions, you then have to assign them to which ever entity you want. E.g. All the boxes you create; SetCollisionType(PROP) On the player; SetCollisionType(CHARACTER) When you right click and pick the object up; HeldItem->SetCollisionType(HELDITEM) When you right click and release the object; HeldItem->SetCollisionType(PROP)
  10. Ah they can be any constant. These are some that come with Leadwerks; const int COLLISION_NONE = 0; const int COLLISION_PROP = 1; const int COLLISION_SCENE = 2; const int COLLISION_CHARACTER = 3; const int COLLISION_TRIGGER = 4; const int COLLISION_DEBRIS = 5; I'd create my own; const int PROP = 10; const int HELDITEM = 11; const int CHARACTER = 12; I think the max number is 100. Based on this variable in PhysicsDriver.h; int collisionresponse[100][100];
  11. Yeah I'll post it. I just had a thought, are you calling #pragma once at the top of your header file? BaseActor.cpp BaseActor.h
  12. If you want to still collide the heldobject with other entities in your scene you may have to set something up like this; Collision::SetResponse(PROP, CHARACTER, Collision::Collide); Collision::SetResponse(PROP, PROP, Collision::Collide); Collision::SetResponse(PROP, HELDITEM, Collision::Collide); Collision::SetResponse(HELDITEM, CHARACTER, Collision::None);
  13. That looks to be the character controller colliding with the box, your setting the target position of the cube which is forcing its way under the controller. Try disabling collision between the prop you grab and the character controller. Collsion::SetResponse(int type1, int type2, int response)
  14. I have had errors like that before, saying I need to insert a semicolon but it has never been the case. Usually there was a semicolon missed somewhere either in the cpp or header files. he only difference I see between my actor code and yours is mine has a private member, and the functions derived from Actor are declared as virtual. class BaseActor : public Actor { private: public: BaseActor(); ~BaseActor(); virtual void UpdateWorld(); }; Not sure if it will make a difference though. virtual void Attach() Single event possible when a script is attached
  15. You need to create an entity object first; Entity* entity = Entity::Box(); entity->SetActor(zombie_001);
  16. No I'm not sure about that one. I can't see anything obviously wrong with it. Have you tried moving it back beneath Attach() function after you made the zombie class drive from Actor?
  17. Also to use the Actor system your class needs to derive from it; class zombie : public Actor { ...
  18. Have you defined zombie_001 and entity somewhere? like; zombie* zombie_001 = nullptr; Entity* entity = nullptr;
  19. You would have to remove the joint. Try this when you click again; .......... else { heldObjectJoint->Release(); heldObjectJoint = nullptr; heldObject->SetGravityMode(true); heldObject = nullptr; } I did a quick test and it doesn't delete the child object (heldObject in this case). I'm not sure how it will work though.
  20. Joint* heldObjectJoint = nullptr; if (gameWindow->MouseHit(1)) { if (heldObject == NULL) { Vec3 p = Vec3(gameWindow->GetWidth() / 2, gameWindow->GetHeight() / 2, 0); if (cam->Pick(p.x, p.y, pickinfo, 0, true)) { if ((pickinfo.entity->mass <= 0.6) && (pickinfo.entity->mass > 0.0) && (heldObject == NULL) && (pickinfo.entity->GetDistance(playerDummy->GetPosition(true)) < 2)) { System::Print(true); heldObject = pickinfo.entity; heldObjectJoint = Joint::Kinematic(0.0f, 0.0f, 0.0f, heldObject); } else { Syst
  21. I think what you might need is the kinematic joint, where you can use joint->SetTargetPositon(carryPivot->GetPosition(true)). I will still react with physics i believe.
  • Create New...