Announcement

Collapse
No announcement yet.

Event hit dont fire when one Actor moves into another Actor.

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

  • replied
    Originally posted by KillerSneak View Post
    From the component screen you should attach the hit event to the collision sphere -> now you have a hit event to nothing. -> Right Click Sphere1 in the above screenshot and add a hit event (On component hit) to it that way the hit event counts for your spehere.
    It still need or Physics simulation or Sweep on in set location. And Now it's different problem, how to get positive/negative angle detween hit point normal and actor forward vector

    Leave a comment:


  • replied
    From the component screen you should attach the hit event to the collision sphere -> now you have a hit event to nothing. -> Right Click Sphere1 in the above screenshot and add a hit event (On component hit) to it that way the hit event counts for your spehere.

    Leave a comment:


  • replied
    Originally posted by mindfane View Post
    Have you tried Acosd node? It is supposed to work in this case.

    https://answers.unrealengine.com/que...ooking-at.html

    Checkout that post. Looks at the accepted answer. Pay attenstion to the right-most pasrt of the blueprint.
    Nope, it won't work, it also always positive, so I cant figure out do I need to turn to the right or to the left.(

    Leave a comment:


  • replied
    Originally posted by Battou View Post
    It works great in 2D (mowing in XY plane), but I'm aming on 3D space movement, and then delta calculated in world axises wich in same collision but when both actors turned for example 90 deg and looking up, will give delta in wrong axis. Any way to get that delta in some actors local space axises?
    Have you tried Acosd node? It is supposed to work in this case.

    https://answers.unrealengine.com/que...ooking-at.html

    Checkout that post. Looks at the accepted answer. Pay attenstion to the right-most pasrt of the blueprint.

    Leave a comment:


  • replied
    Originally posted by mindfane View Post
    Convert the Forward vector and Wall normal into a Rotators and calculate Delta. Check the Yaw part of the resulting rotator. It should have postive and negetive values depending on the angle difference.
    It works great in 2D (mowing in XY plane), but I'm aming on 3D space movement, and then delta calculated in world axises wich in same collision but when both actors turned for example 90 deg and looking up, will give delta in wrong axis. Any way to get that delta in some actors local space axises?

    Leave a comment:


  • replied
    Originally posted by Battou View Post
    It actually works. Thanks. (But still wandering why cant use EventHit) But now I stumbled another problem. I wanted to use hit normal to catculate angle between Actor forward vector and wall normal to calculate sliding collision, so Actor wont stop if wall isn't perpendicular but slow slide along the wall. I can calculate angle, but I don't know how to determine to witch side to slide because angle always positive. Any suggestion? Maybe there are some another way to make sliding collision?
    Convert the Forward vector and Wall normal into a Rotators and calculate Delta. Check the Yaw part of the resulting rotator. It should have postive and negetive values depending on the angle difference.

    Leave a comment:


  • replied
    Originally posted by mindfane View Post
    Thing is, you only need to do a trace when an overlap happens. So it might not be a huge hit on performance. Then again it depends on how frequent overlaps happen. Anyway just try this and see if it works. If it hits performance significantly, we can some up with something else.
    It actually works. Thanks. (But still wandering why cant use EventHit) But now I stumbled another problem. I wanted to use hit normal to catculate angle between Actor forward vector and wall normal to calculate sliding collision, so Actor wont stop if wall isn't perpendicular but slow slide along the wall. I can calculate angle, but I don't know how to determine to witch side to slide because angle always positive. Any suggestion? Maybe there are some another way to make sliding collision?

    Leave a comment:


  • replied
    Originally posted by Battou View Post
    I can trace, but how much performance cost trace have? I thought about constant trace ahead before, but I'm afraid that it will be big performance hit.
    Thing is, you only need to do a trace when an overlap happens. So it might not be a huge hit on performance. Then again it depends on how frequent overlaps happen. Anyway just try this and see if it works. If it hits performance significantly, we can some up with something else.

    Leave a comment:


  • replied
    Originally posted by mindfane View Post
    Problem is I think 'Hit' is fired when actor is actually blocked. I played around today with several setup, and this is what I am seeing. Couldn't you try to do a trace from one Actor to the Other within 'Begin Overlap' to get the hit normal and direction?
    I can trace, but how much performance cost trace have? I thought about constant trace ahead before, but I'm afraid that it will be big performance hit.

    Leave a comment:


  • replied
    Problem is I think 'Hit' is fired when actor is actually blocked. I played around today with several setup, and this is what I am seeing. Couldn't you try to do a trace from one Actor to the Other within 'Begin Overlap' to get the hit normal and direction?

    Leave a comment:


  • replied
    Originally posted by mindfane View Post
    Ok looks like you need to listen to 'Event begin Overlap' instead of hit. I think one of the posts above suggests this. Did you try that?
    But I need hit info such as hit point and normal.

    Leave a comment:


  • replied
    Originally posted by Battou View Post
    I want make so that when I press W key some object, not pawn or character, will move forward without physics simulation and when it toches another object ahead then EventHit will fire, but without restrictin a movement, or restricting it only in that dirrection and not all movement at all.
    Ok looks like you need to listen to 'Event begin Overlap' instead of hit. I think one of the posts above suggests this. Did you try that?

    Leave a comment:


  • replied
    Originally posted by Havoc View Post
    We might be able to help you better if you explain what you're trying to do. I personally would set them up as projectiles if they are just moving in a line. Or maybe vinterp to a Move Component node so it moves smoothly to your desired location.
    I want make so that when I press W key some object, not pawn or character, will move forward without physics simulation and when it toches another object ahead then EventHit will fire, but without restrictin a movement, or restricting it only in that dirrection and not all movement at all.

    Leave a comment:


  • replied
    We might be able to help you better if you explain what you're trying to do. I personally would set them up as projectiles if they are just moving in a line. Or maybe vinterp to a Move Component node so it moves smoothly to your desired location.

    Leave a comment:


  • replied
    Originally posted by mindfane View Post
    In the Set Actor Location function set 'Sweep' to true. See if that changes anything
    Its working, but it not enabels hit events, but stops moving when cilliding, and its stops moving forward even if its collided from side or bottom. But I need Event Hit data without forcing to stop.

    Leave a comment:

Working...
X