Object doesn't collide when it's small

Hi. I am facing some problem with collision.
I am testing it on First Person Shooter template with original models etc.
As you know, in Crytek's code weapon spawns bullet (primitive_sphere.cgf sized to 0.05f of a normal size) and it collides with everything. When I spawn another human entity and I try to shoot it, the bullet goes through it without logging the collision. I figured out, that if bullet is bigger than this (instead of 0.05f for example 0.3f) it collides perfectly. Both are physicalized. Human is PE_LIVING and bullet is PE_RIGID, but there must be something more to it. Why does it ignore collision with tiny objects? Mass of bullet is set to 160 and human 90.
Cryengine tutorial videos on my Youtube channel! Check it out !

Re: Object doesn't collide when it's small

I do scale the object. I checked that cvar. The proxy is scales along with the object, so I have no idea what's going on. It only avoids collision with PE_LIVING entities (I did not set up any filtering). If I shoot it against some simple cube etc. it collides with it. But with living entities it collides only when it's not scaled down so much.

Well I actualy changed the whole physics type.. Instead of this :

Code: Select all

SEntityPhysicalizeParams physParams; physParams.type = PE_RIGID; physParams.mass = fMass; physParams.pPlayerDynamics = &dynams; GetEntity()->Physicalize(physParams);
I used PE_PARTICLE and not only I got collision for that bullet system, but also the "heading" property seems to fit the bullet concept way better than impulse or velocity action. Now my current code :

Code: Select all

pe_params_particle partParams; partParams.flags = particle_traceable | particle_no_roll | pef_log_collisions; partParams.mass = 0; partParams.size = 0.1f; partParams.thickness = 0.1f; partParams.gravity = Vec3(0, 0, 0); partParams.kAirResistance = 0.0f; partParams.surface_idx = 0; partParams.velocity = 100.0f; partParams.heading = direction; SEntityPhysicalizeParams params; params.pParticle = &partParams; params.type = PE_PARTICLE; GetEntity()->Physicalize(params);
Awesome! Thank you for help anyway, I checked your links and I've learned a couple of useful cvars.
Cryengine tutorial videos on my Youtube channel! Check it out !

Who is online

Users browsing this forum: No registered users and 4 guests