Dynamic Projectile Crazy speeds and collisions

ok. all i’m saying is i’ve done alot of projectile stuff but often i get the problem that when the bullet hits the dynamic character sphere, the sphere flys back as if it had been hit by a bus. I know you can end the object when it has a collision but i find the collisions impact gets resolved first.

also are you supposed to use a dynamic object as the laser plane or just a plane, as i find problems with lin V especially when u turn off collision.

it’s all confusing as there’s so many ways of setting it up, so could someone enlighten me as to the tried and tested way.

I will probably just use the ray sensor.

-Luke

I maybe have an explanation for the problem when the sphere " flys back as if it had been hit by a bus" .

I had this problem because the “sphere” used a material with friction, or the ground has a material with friction. Then if the bullet hits, the sphere gets off the ground for a split second, eliminating the friction material.

Without this friction, the sphere will suddenly “fly back as if it had been hit by a bus” .

You can try to change this, by giving your sphere more mass then the bullet, or delete the friction material

I’m not sure what you mean about your second question, but I wouldn’t make bullets and stuff dynamic actors, unless you really want to use the pysics system.
Don’t turn off the face collision, make the object a “ghost object” instead.
(if you turn of face collision, you cannot detect if a collision occurred)

Also, the sphere is used for the physics system, it’s not used for collision detection between objects (which is done per face), although it does handle the “physics collisions”.

pretty confusing, I agree.

Jasper

Id avoid using the bullets as collision detectors. Turn of collisions on your bullet and use a ray sensor emitted from your gun combined with the your fire sensor. When the ray hits the enemy have it emit a message like “got hit” the enemy can recieve this message and reacte accordingly. Hope this helps.

But then ALL the enemies will get that message, not just the one you shot.

You can use python:


ob raysensor.getHitObject()
if hasattr(ob,"health"):   #Make sure the object we hit has health to take away
    ob.health = ob.health - 1

As for the bullet, you can either make it a ghost so it doesn’t knock the character back at all, or give the character a much higher mass making collisions not afect it so much, but that means resetting most of your other physics settings.

i have an empty that always copies the location of where the ray hits. when you fire this empty will add a cube named bullet with a time of 1. the cube is invisible and i have found this method to work very well.

ok thanx guys for all that info. Saluk, yes i was planning on using a script like that for the ray sensor thing if i couldn’t get a standard projectile to do the job.

The point is to have a slow(ish) moving laser that you can see shoot past you if you dodge it. So therefore a ghost would probably be most appropriate.

I’ve never used a ghost, i thought they didnt detect collisions and so wouldn’t be of use as a bullet (to detect the collision)
-Luke

hey abracsis, if u use non-dynamic characters, these collision problems wouldnt happen, as well as ur chacter not being to fat to walk through tight doors or walking though tables cuz ur dynamic sphere is too big or too small

it might be something u’ll look into, i used to make my games with dynamic chacters, now i’ve learned alot to “simulate” a dynamic character without using the dynamic button, i find it much better and a good investment in the end… if u know what i mean

u can make ur bullets/lazers as “ghosts” in the actor buttons like everyone said if u still want to use ur dynamic chacters,… that would be my best solution