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

Lethal Raptor Games

Members
  • Content Count

    1,019
  • Joined

  • Last visited

Everything posted by Lethal Raptor Games

  1. If you change the method they will be available. Those options don't apply to Average Normal.
  2. What you'll need is an Actor in C++. The script is basically an Actor (but in LUA) that attaches to an Entity. An Actor is a class in C++ that attaches to an Entity. Look in the Actor.h and Actor.cpp files for Leadwerks. You derive from the Actor class like this. I named mine cBaseActor, but you can name it anything you like. class cBaseActor : public Actor { private: public: cBaseActor(); ~cBaseActor(); //reDeclare the functions found in Actor.h, create a BaseActor.cpp and define your functions there like in the script void Attach(); virtual void UpdateWorld(
  3. Yeah I set mine to 0.1 but it wasn't perfect. Lowering the friction of the kinematic joint changes how it effects the rotation and position of it's child.
  4. As in when using SetTargetPosition()? I found using a very low mass made it accelerate and de-accelerate a lot faster.
  5. Thought I'd update this here too, the above code doesn't get the correct newton world. The code below does; NewtonWorld* GetNewtonWorld() { auto _world = World::GetCurrent(); auto _simulation = (NewtonDynamicsSimulation*)_world->simulation; return _simulation->newtonworld; }
  6. Good idea. I'm keen to see how ray-casting will go, when you get to that.
  7. Looking forward to seeing it develop. What are you working on next?
  8. Thank you! That answer led me to finding the problem. This is how I was getting the NewtonWorld; NewtonWorld* GetNewtonWorld() { return ((NewtonDynamicsPhysicsDriver*)NewtonDynamicsPhysicsDriver::GetCurrent())->collisionWorld; } Which worked for a lot of things but it didn't match when I got the world like this; Model* bn = Model::Box(); mdl->SetShape(Shape::Box()); auto body = ((NewtonDynamicsBody*)mdl->body)->body; MainFrame::newtonWorld = NewtonBodyGetWorld(body); With the later the callbacks worked! I take it then this is a callback in UpdateWor
  9. So once again I am attempting to break things - @Josh I have question for you... I am using Newton functions to add a PreUpdate callback to the newton world but the callbacks are not being called unless I call NewtonUpdate myself, is World::Update() not calling NewtonUpdate?
  10. It could be that the character controller dosnt like being inside another physics shape. You may have to find a different way to stop your held item from hitting your player. Maybe a relative height limit?
  11. Not sure exactly but you could try calling these three lines after moving your heldObject and just before Time::Update(); ....... player->SetInput(mouseX, walk, strafe, jump); carryPivot->SetInput(mouseX, walk * 2, jump); cam->SetRotation(mouseY, 0, 0); Time::Update(); SetInput() uses physics for controlling the character controller and shouldn't break the simulation. I take it as your moving your mouse is still being held down?
  12. I think I get what you're trying to do, but are you able to post a video of what's happening?
  13. After looking through the Newton SDK I saw a couple of hooks; PreUpdate() and PostUpdate() and I was wondering at what point is the UpdatePhysics() hook called? Is it before or after physics has been calculated / applied?
  14. Yeah I'd like to see every function documented and explained. And if it isn't officially supported just have it written at the top of the page.
  15. As Josh said in the link, it's the offset from the child entity but it cant be changed once created. Probably best to use a kinematic joint on a pivot. Then parent the picked entity to that pivot. Then set the picked entities global position to that of the pivots + an offset.
  16. What exactly are you trying to do? Are you trying to rotate the entity at the picked position?
  17. https://www.leadwerks.com/community/topic/18966-kinematic-position/?tab=comments#comment-118400 I think the joint is only a constraint, rather than an entity that can be moved.
  18. On the file editing side, if your game is with Steam and someone does manage to edit a file and change the way the game plays, I would think Steam will see that the bits no longer match and your game is in need of an update? Which will reset everything. The multiplier side of is vulnerable.
  19. The best way is to load them outside of the actor class. Then you attach the actor to each loaded zombie entity. If you load them in the Attach function you would have to create a separate object (maybe a pivot) and assign the actor class to that pivot so that the actor functions are called.
  20. You could implement that in the Actor system, but I think why it's not there is because, unless it's a trigger, the collision is over and done with once the objects bounces. It would only return true for an instant and it could be missed.
  21. How does one cheat in a game? If you protect your files and don't provide a console and don't make cheat codes... how can it be done?
  22. VS has a lot of good debugging tools. Personally, despite some of the things that can go wrong with it, I would use it over the internal editor. Welcome How I would go about it is load 100 zombies in an Entity* array. Then assign each entity a ZombieActor class. Inside your ZombieActor class you make it control each entity. E.g. In UpdateWorld() you would check the distance to the player, if the payer is close you make it attack.
  23. I'd say it was VS. A few years ago I had a similar issue. I think how I solved it was I just deleted all the white spaces between the functions and the error was solved. Luckily it wasn't a big class. Another thing I've noticed with VS, sometimes it will say you have an error but it will compile and run fine. I think this is the intellisense kicking the bucket - the only way I've found to fix that is to restart VS.
×
×
  • Create New...