DaDonik
-
Posts
376 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by DaDonik
-
-
If it's possible to determine that a body was thrown in the air (just like the user presses a certain key),
you could set a flag that tells your code that the body was thrown.
Now you can check if your velocity and rotation is near 0 and just ignore it, if the flag is set.
You could apply the same for a bouncing object. Just use the collision callback and check if the force is
sufficient to get the body airborne again. If so, set the flag again.
I do not recommend to check any float value against 0.0f.
Normally you would define a small value beyond which you assume it's zero.
The way i would do it:
// Global const float cfMinVelocity = 0.01f; // For each throwable body bool bAirborne = false; // Check if the velocity reaches zero LE::TVec3 Vel = LE::GetBodyVelocity(TheBody); float fVelocity = (float)sqrt(Vel.X*Vel.X + Vel.Y*Vel.Y + Vel.Z*Vel.Z); if (fVelocity <= cfMinVelocity) { if (!bAirborne) { // Object is not airborne/thrown and has stopped moving } else { // Object is airborn/thrown and has stopped moving } }
You can even get rid of the square root and check against cfMinVelocity*cfMinVelocity to get
maximum performance =)
Edit:
Assume a player that can shoot a ball that then bounces off other objects.
The player shoots the ball and you set the flag bAirborne to true.
Now the ball flies around and finally hits an object. The collision callback of
the ball will be called and you can set bAirborne to false. If the collision speed
was fast enough, you set bAirborne to true again, because the ball will become
airborne again.
- 1
-
if I am doing that I will just copy the "bg_pos" entity to the Pos entity, but I will not be able later to move that object for example. I will need to search again through all...
I don't know Blitzmax, but in the C/C++ version of LE2 every TEntity, TModel, TMesh, TWhatever is just a pointer.
That means you are not creating a copy of the actual thing, just a copy of the pointer to it.
-
-
I'm not sure about Mirrors Edge, but Battlefield 3 uses http://www.geomerics.com/enlighten/
Since Mirrors Edge was also made by Dice, i'm convinced it uses the same technique.
-
Hmm in that case i think you just have too many roads ^^
-
The best program for creating huge maps is...well the Editor. It sounds more like your PC is not up to the task.
Would be kind of helpful if you could put your system specification in your signature.
-
You should ask someone in a Flight Simulator X forum. This forum is for Leadwerks Engine, which has absolutely nothing to do with FSX. Also the pdf's DigitalHax posted are for Leadwerks Engine...
-
If you put an environment object into your scene, you can adjust the view distance in it's properties.
-
Like Benton said you can split your mesh into several meshes, UV map them seperately and then export them together as one object.
In the end you have one .gmf file that contains seperate meshes, each with it's own textures.
I use Blender, so i can't help you on anything C4D specific.
-
Oh well, thats really sad. Taking care for a relative is a good thing to do and should be rewarded!
-
This is getting funnier with each post...ehh spam.
-
Josh said it will be released this->summer
-
It's not a native feature in LE2, but it is possible. Just keep in mind that it needs to render everything twice which will pretty much cut your framerate in half.
Btw it's called Leadwerks
-
As it stands, I'm kinda concerned about the performance/frame-rate I'm getting in the editor.
Unlike most other graphics engines LE2 uses deferred rendering, which has a high initial
performance impact. The good thing is the performance will not drop as fast as in other
engines if you add models and lights
My guess is that your graphics card is not quite up to date. What do you have?
-
If you use Vista or Win7 you have to accept that you are not the master of your windows partition anymore.
Try installing it on a different HDD or partition, thats what works for me.
-
Stange problem you have there ChrisMAN. I never had problems converting big meshes, but i use UU3D for model conversion.
If you have some money to spend i recommend buying UU3D(you won't regret it). Other than that you could upload the mesh somewhere and PM me a link, so i can have a look at it.
Is the .gmf correct? Is there a problem? I think .gmf compresses the files...
29mb compressed to 1k?!? Never laughed that much, thx
-
Yes you did
- 1
-
I would say it really depends on what you want to achieve. Both are valid options.
In case you have lots and lots of rooms there will be a noticeable speed difference between using one or four entites per room.
If you have a room like yours with ~400 polygons i see no reason to make it 4 seperate entities.
It would be a good idea if a single wall had thousands of polygons, but with 400 it's not necessary in my opinion.
-
Check this page: http://www.leadwerks.com/wiki/index.php?title=UpdatePhysicsCallback
It made me assume that the physics engine is constantly updated at 60hz, if i do it like:
UpdateWorld(AppSpeed());
-
It's actually based on the physics update rate, which is 60. But you are right, if i move sth without physics i would get in trouble =)
-
I can't give you precise information about "move" and "acceleration", but i can say that those values are not frame rate independent. Means you still need to multiply the passed value by Appspeed() to get it right.
What i use is a macro for ((1.0f / 60.0f) * Appspeed()), which allows me to use meters per seconds everywhere.
-
for intelisence and highlighting, i am using Visual Assist X perfect tool, i can't live without it.
Thats so true, once you have it you won't go back.
-
That looks pretty nice!
Looks like we can have a look at it ourselfs, soon
-
I'm available
The good thing is i live in Germany, too.
Is there a command to check if a physics body has come to rest ?
in Programming
Posted
You should take the direction of the body's current velocity into account. Just relying on collisions will cause "bugs".
Imagine an already airborne body hitting the ceiling...