Announcement

Collapse
No announcement yet.

Problem with multi sphere trace

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem with multi sphere trace

    Hi,

    I'm looking for a solution to my problem.

    My problem :

    i cast a spell, make it explode when Hit Event and i use a multi sphere trace for detect all pawn in a radius. All pawn in the radius are hit but the seem to be hit many times.
    I think the problem came with the loop who seem to count every pawn in the game. (cast and hit event work) In an other spell i use the single sphere trace and no problem.

    Someone have a solution or can explain me with that don't work ?

    Thx

    a screen of the spell :

    Click image for larger version

Name:	ProblemWithMultiSphereTrace.PNG
Views:	1
Size:	405.2 KB
ID:	1150885

    #2
    Hello,
    You may can replace multi sphere line trace by a collision sphere and do a "get overlapping actors". Or check if actor is in a control array, if yes ignore it, if no, hit the actor and add it to the array.

    Comment


      #3
      Hi,
      thx for your answer. i allready use a collision sphere for detect impact but i can expend the collision sphere radius because it explode on caster when i cast the spell.

      i will try the control array but i not really see how to do that.

      Comment


        #4
        You can set location of your sphere location of caster: forward add sphere radius and eventually add a ignore character player.
        For the array, you create an array of actor, do your loop from linetrace and check if array "contains" the actor (from actor hit) If yes you do nothing, if no you add damage and add it to array. At the end of the loop you "clear" the array.
        Last edited by Fen; 05-31-2015, 11:28 AM.

        Comment


          #5
          i try to change sphere radius but my way to do that seem not good. But the spell damage at sphere collision working good.

          i don't see how to add an ignore character.

          the spell with an update

          Click image for larger version

Name:	ProblemWithMultiSphereTrace2.PNG
Views:	1
Size:	366.5 KB
ID:	1079188
          Last edited by Meriamon; 05-31-2015, 05:33 PM.

          Comment


            #6
            I did this try in character. You can replace "get actor location" by "hit location" and it would be the same. Character is ignored in input "actors to ignore" in "sphere overlap actors".

            Comment


              #7
              Good evening,

              i just try your changes but that don't do what i want to do.

              The sphere overlap radius seem no apply at the impact. And if i change the sphere radius in the spell with the actors to ignore. the spell impact the caster.

              Click image for larger version

Name:	ProblemWithMultiSphereTrace3.PNG
Views:	1
Size:	392.4 KB
ID:	1079243

              Comment


                #8
                I kept time to create a fps project and try both "get actor location" and "hit location" (which are supposed being same, except pivot point of projectile offset) in the FirstPersonProjectile blueprint and it worked fine for me with a print string and the ignore character. Trouble may comes from the "cast to mmocharacter" . It may comes from your spell too. Or something else you modified and i can't see.

                Comment


                  #9
                  i just do an other try with the sphere overlap actors and that seem working good.

                  I will do more test.

                  Merci pour ton aide

                  Comment

                  Working...
                  X