Forum rules - please read before posting.

Moving Big Boxes

I'm creating a new mechanic that you can move big boxes, basically I create 4 hotspots on each side, so when you click on it the box move 1 unit to that side.
Now what I want is that when you are in a wall the box doesn't move.

Since I'm using translate, even if there is rigdybody, the boxes moves inside the wall and after the animation is over the boxes jumps outside the wall. Maybe I can change the translate to something physically?

The second attempt was using triggers, so when you move the box inside a trigger that trigger disable the hotspot, but if I have multiple boxes it will be hard to control it.

It seems that I don't have a "check trigger" in the action list.

So what can I do?

Comments

  • Is this for a 2D or a 3D game, and can you share screenshots of the issue - showing both the objects/colliders in the scene, the box's Inspector, as well as one of the Interactions that moves it?

  • edited December 2022



    I created a statue with rigibody and collider and the Box with the same

    When I tell it to translate the box try to move inside the statue each frame make it clipping, I set the player to be together with the box so it move at the same position and remove it after translate, make the character be launched after that haha.

    Video showing the problem:
    https://streamable.com/ujy9no

    If I don't set the player as children:
    https://streamable.com/wpe6u7

  • The Player issue may be a knock-on effect of the box collision issue.

    Moving the object with physics (i.e. using the Rigidbody) would still cause issues, since the operation involves moving to a specific position, rather than a directional force.

    It should be possible, though, to add the option for Moveables to predict if a movement command will result in a collision, and freeze if so.

    If you need to make things more dynamic (i.e. only stop moving at the moment it hits another collider), you'd need to attach a custom script that listens for collisions and evaluates them. This is because you'd likely want to only listen out for specific colliders, making a built-in "one-size fits all" approach too unpredictable.

  • It will be cool to have Actionlist for physical objects, like add force, add rotation, etc...

    Another thing that will be cool for Actionlist it will be check for triggers, like the trigger it self that has a lot of option there, but for the object it self check if there is triggers around.

    For now, I really don't have a ideal way to make it, I'm working on other ideas and I'll try more options later.

    Thank you.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.