Announcement

Collapse
No announcement yet.

How to implement bounds between two actors

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

    How to implement bounds between two actors

    Hello everyone

    i got two actors A1 and A2, what i need to implement is A2 can move freely but within limited bounds, so i should have variable called bounds=[X=200,Y=300,Z=500]
    which mean the actor A2 can move in distance either forward or backward:
    200 in X axis (forward , backward)
    300 in Y Axis (right, left)
    500 in Z Axis (up, down)

    i tried to implement it manually by calculating distance between A1 and A2 but it's looks like not that simple and there are alot of cases to handle and many issues to fix,

    another try was using an actor A3 spawned manually around A1 which contains 6 box collision from all sides and custom Collision Channel, now, when i spawn that actor manually in level (drag drop ti level scene), it works perfect, but if i attach it as ChildActor in A1 or even use SpawnActorFromClass collision is not detected and A2 will overlap and exceed it as it not exists .

    so if anyone implemented something like this what is the trick to do here ?


    the expected result:
    A1 is a Character
    A2 is an ActorComponent (something like an assistant (AST1) to player)
    A2 can control (AST1) but should be move in limited distance away from A1 and can not exceed it.


    #2
    guys any one ?!!

    Comment

    Working...
    X