I search OnParticleCollision issue and read almost all.
What I want is if my player character shoot particle, enemy must got damage.
So, I attached parti-collider and check the send-message-box.
And script to enemy like this,
function OnParticleCollision (other : GameObject)
{
print("hitted");
damage = particle.damage;
But when hitted, it does not work at all.
This because enemy character not moving, just stopping there and particle is coming and hitted, right?
So, only if enemy is moving toward particle, then this OnPartcleCollision take effect?
Then why unity made like this?
And what is code of particle itself moving toward enemy, and checking that situation?
I search OnParticleCollision issue and read almost all.
What I want is if my player character shoot particle, enemy must got damage.
So, I attached parti-collider and check the send-message-box.
And script to enemy like this,
function OnParticleCollision (other : GameObject)
{
print("hitted");
damage = particle.damage;
But when hitted, it does not work at all.
This because enemy character not moving, just stopping there and particle is coming and hitted, right?
So, only if enemy is moving toward particle, then this OnPartcleCollision take effect?
Then why unity made like this?
And what is code of particle itself moving toward enemy, and checking that situation?
I found why.
Because my enemy character’s transform position is located at most below the character(foot’s position), and does not affected by effect on body.
So this is also problem.
How to move that trasform’s position spot’s position?
where the transform is positioned is of no interest at all, its all about the capsule collider settings on the object
Yes, if think only particle collision, your way is right,
but,
in case of homing missile, it always go to enemy’s foot’s position.
Very ridiculous.
So, this is why another child gameobject be needed only for targeting.
You can add a child object for targetting, but you can also just add a vector offset to the transform.position value:-
var targetPoint = transform.position + Vector3.up * 3.0;
leegod
July 6, 2010, 12:28am
6
You can add a child object for targetting, but you can also just add a vector offset to the transform.position value:-
var targetPoint = transform.position + Vector3.up * 3.0;
That already I did, but this method’s problem is, if I use enemy tag to check it out missile to collide,
it goes to upward of tiny enemy, and thus, it just go passing above the tiny enemy.
or hit upper part of tiny enemy.
This also look ridiculous…