Hi Rubeus,
thank you for your reply.
I must say that I didnt understand you - or you understand me wrong.
I want to let the bullets fly over some time ( lets say, 3 secs for reaching the max distance - after traveling this distance the bullet will be deleted )
The bullets moves very fast - but after this time without hitting somewhat,
the bullet get deleted. If any player gets hit (randomly) by the bullet in this time, he will lose hp - ( depending on what part of the body he was hit ).
I dont want to check against every mesh / piece / capsule / sphere / box while the bullet is flying, this is done automatically by PhysX -
( even the AABBs from meshs ).
-> My statement gives me a new way of thinking about the ragdoll of players. I will call ragdollblend() only when the bullet hits the player capsule - ( actor.group == AG_CONTROLLER ) - for some time. ( I dont know if there is a function which tests if an random actor is inside the capusle - ( only possible for trigger shapes ? ) ) - When this works, I will save some cpu time because ragdoll isnt enabled the whole time, only if the bullet is "inside" the capsule from player. Then, the bullet hits a capsule / sphere from the skeleton, and I will cast immediately a ray to get the faces of that physic mesh. Hm. That wont work because I need the faces of the real mesh - .... --> Else the bullet doesnt hit any shape of the player, I will get the false - bool from the "isInside" function. After receiving it, I disable the ragdollBlend().
--> [Additionally I know PhysX before I switched to EE, so
Im working with the Physics.reportTrigger(..) function - but I dont see
a way to get information about if the trigger is entered - inside - or
leaving the shape. This is native possible in the PhysX SDK.]
--> This new way of thinking gives me a problem to get the faces of the real mesh - maybe there is a function which casts a ray to a real mesh and gets his faces - where I can put a bullethole on the normal.
I dont know if there is a function ( isInside, raytoMesh ..? ) in EE, but I guess so.
So this is the old way to get the collision faces / the collision of the bullet.
( When the attachment works, you can see here a picture )
You see that the bullet have an box physic mesh, and I will cast a ray at the peek of that bullet. ( Very bad - because I have to cast it every time )
So I used another technique to get the ray and the collision.
( When the attachment works, you can see here a picture )
You see that the physic mesh is larger - and I will cast a ray only when the bullet gets hitted the physic mesh ( first the player capsule, then the sekeleton capsuls / spheres ) - to receive faces.
[ I know, I need to get the real faces of the mesh ]
So ... maybe you can understand me better with this explanataion.
Do you have any ideas?
Regards.