-
Posts
50 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by george68
-
-
33 minutes ago, reepblue said:
There should be a World->CountEntities() now that I think of it. You can also check the Menu.lua script as that iterates through all the entities without a Map hook to find a camera. It should use the CountEntities() function.
Sorry about that.
I'll take a look.
Thank you very much!
-
Hi,
Is there any way to get the number of entities they are stored in a map file.
I know that I can iterate through all the entities using the hook function, but I was wondering If I can get the number of entities without iteration
-
Thank you,
I was expecting such an answer, but it was not working, due to a bug in my code.
I created the camera before the world
I spent 2 hours to find it...
- 1
- 1
-
Neither of those.
I need to switch between the two cameras on one monitor in full-screen mode
-
Hi, Is there any way to alternate two different full-screen cameras in my game. Please note that I am not interested to split the screen or display a mini map for example.
-
Thank you,
It works. Here is a code snippet for anyone may interested for a quick pick:
iVec2 gm; for (int i = 0; i < System::CountGraphicsModes(); ++i) gm = System::GetGraphicsMode(i); pWindow = Window::Create("Hello world", 0, 0, gm.x, gm.y, Window::FullScreen);
- 1
-
Hi,
The following function call returns a NULL pointer:
pWindow = Window::Create("Hello World", 0, 0, 1280, 720);
Any idea why does this happening?
-
I really don't know much about the new engine, except the GUI.
I don't think that the new engine will face issues like this one above., since this is the nature of a physics engine. And this is exactly the reason I prefer to avoid physics most of the time
-
59 minutes ago, Lethal Raptor Games said:
If you want you could just add some invisible walls to the platform to stop you falling off. Make some code that enables or disables them depending on what you want to do.
Thank you. I prefer to write some code to cancel the controller on the platform and move the player as a regular rigid body. I don't know though, if this is possible.
-
1 minute ago, JMKUltra said:
Honestly, for now I would live with it if possible. I've seen much worse behavior in high-end games.
We want to get everything 100% perfect, but in terms of what we can do in the short-term I would not worry about it for now.
It is true
A month ago I was playing with the GODOT engine and I found that there is an alternative function 'update()' for the player, with a snap parameter which perfectly fits for a nice movement on moving platforms (2D)
-
Quote
I can imagine that this for you annoying effect could exactly be desired in another case/game
I agree.
I tried both the friction and the gravity without success. It seems that a character controller has its own rules.
If I have time, I'll try to implement a player without using the character controller physics.
-
Thank you both for the tips, but none of these work.
I was hoping that setting the physics mode to 'CharacterPhysics' for the player, will solve issues like these
-
Hi,
In the video below
you can see that every time I move the character forward, it moves a bit to the direction of the moving platform
Does anyone know if I can avoid this?
Here is how I create the player:
pControler = Pivot::Create(); pControler->SetPhysicsMode(Entity::CharacterPhysics); pControler->SetMass(1.0); pControler->SetPosition(pEntity->GetPosition(true)); pEntity->SetParent(pControler, true); pEntity->SetPosition(0.0, getHeight(), 0.0); pEntity->SetShape(NULL); pEntity->SetMass(0.0);
and here is how I create the platform:
std::string szVal; Vec3 origin; Vec3 distance; origin = pEntity->GetPosition(true); distance.x = std::atof(pEntity->GetKeyValue("Dx", "").c_str()); distance.y = std::atof(pEntity->GetKeyValue("Dy", "").c_str()); distance.z = std::atof(pEntity->GetKeyValue("Dz", "").c_str()); bEnabled = (bool)std::atoi(pEntity->GetKeyValue("Enabled", "").c_str()); pEntity->SetShadowMode(2); pEntity->SetGravityMode(false); pEntity->SetCollisionType(Collision::Prop); pEntity->SetMass(1.0); pJoint = NULL; SetTarget(origin, origin + distance);
The SetTarget function:
Vec3 pin; mOrigin = origin; mTarget = target; mDistance = mTarget - mOrigin; if (pJoint) { pJoint->DisableMotor(); pJoint->Release(); } pin = mDistance.Normalize(); pJoint = Joint::Slider(mOrigin.x, mOrigin.y, mOrigin.z, pin.x, pin.y, pin.z, pEntity, NULL); pJoint->EnableMotor(); pJoint->SetMotorSpeed(2.0); pJoint->SetTargetAngle(mDistance.Length());
-
Quote
Has pEntity got a collision shape?
Yes, it has.
I set up a physics shape to NULL:
pEntity->SetShape(NULL);
and it works OK.
Thank you!
- 1
- 1
-
Hi,
I've set up a character controller as follows:
pControler = Pivot::Create(); pControler->SetPhysicsMode(Entity::CharacterPhysics); pControler->SetMass(1.0); pControler->SetPosition(pEntity->GetPosition(true)); pEntity->SetParent(pControler, true); pEntity->SetPosition(0.0, getHeight(), 0.0); pEntity->SetMass(0.0);
and the update world function is:
walk = (window->KeyDown(Key::Up) - window->KeyDown(Key::Down)) * 7.0; if (window->KeyDown(Key::Shift)) { strafe = (window->KeyDown(Key::Right) - window->KeyDown(Key::Left)) * 2.5; } else { if (window->KeyDown(Key::Right)) angle += 2.0; if (window->KeyDown(Key::Left)) angle -= 2.0; } jump = window->KeyHit(Key::Control) * 10.0; pControler->SetInput(angle, walk, strafe, jump);
Everything works fine, unless I change I change the value from 10.0 to 20.0 in the following line:
jump = window->KeyHit(Key::Control) * 20.0;
Please watch the following video:
-
@Einlander: Thanks. I'll take a look at your snipped.
@Brutile: I missed this parameter. I suppose that I have to call this function from within the update loop and call 3 times (one for each axis)
-
Thanks. This is what I was looking for.
But I still want to implement a custom function because I want the transition take place smoothly.
-
Hi,
I need a function that rotates an entity in order to turn and look at another one.
So far I have calculated the vector from the source to the destination entity but I don't know how to calculate the pitch, yaw and the roll of the vector.
Any assistance will be appreciated.
-
Oh I see... Thanks
- 1
-
Could you please give an example of a non-normal case?
-
Should I use true or false with the context sync function?
Is it true that input lag exists when sync is true?
(http://www.leadwerks.com/werkspace/topic/13993-sync/page__hl__sync)
Thanks in advance
-
Thank you for your replies.
So far, I am changing the animation's speed and the movement's speed.
I've asked in case that I've missed sth
-
Hi,
Is there any rule that I can use in order to calculate the relevancy between the movement speed of a character and the speed of the walk animation in order to make the walk look as much better as it can be?
-
I am not a pro but Debug is not only for troubleshooting but for developing also.
Anyway, I noticed from the console output that the most of the time is spent on specific .tex file
Number of entities stored in a map (C++)
in Programming
Posted
For maps with large number of entities, it would be nice if I can display a progress of loading. So, I need this information.
So far I don't now how to get the number of entities in the map, without load it first.