unity – How can i add to the waypoints multiple objects to move between the waypoints?

Your approach is conceptually backwards. Waypoints should generally be defined in a basic data structure, and objects that want to follow the waypoints should reference the set of waypoints. Objects move themselves while following waypoints; waypoints do not move objects.

Here’s a simple example:

public class Waypoints : MonoBehaviour {
    //with this approach, you use GameObjects to represent your waypoints 
    //(they can be empty if you want the waypoint to be invisible)
    (SerializeField) private List<Transform> waypoints;
    
    public int Count => waypoints.Count;
    public Vector3 GetWaypoint(int index) {
        return waypoints(index).position;
    }
}

public class WaypointFollower : MonoBehaviour {
    (SerializeField) private Waypoints waypoints;
    (SerializeField) private float speed = 5f;

    private int waypointIndex = 0;

    void Update() {
        Vector3 waypoint = waypoints(waypointIndex);
        //movement
        float distance = speed * Time.deltaTime;
        transform.position = Vector3.MoveTowards(transform.position, waypoint, distance);

        //check if we've reached the waypoint
        float threshold = .5f; //how close is considered having reached the waypoint
        if (Vector3.Distance(transform.position, waypoint) < threshold) {
            //wraps back to 0 when we reach last waypoint
            waypointIndex = (waypointIndex + 1) % waypoints.Count;
        }
    }
}

This way, any number of moving objects can independently follow the waypoints. The waypoints do not have to know about or manage state for any of the moving objects; those objects can manage their own state.

linux – Bash script to copy files and then move them to trash (non-destructive)

I am trying to write a script to copy files with cp or, preferably, rsync and then move the source files to the trash. I do not want to use mv because in case of an error, I want to be able to recover the source files.

This script works. It hard codes the destination folder.

for i in "$@"; do
    cp -a -R "$i" '/home/userxyz/Downloads/folder1'
    gio trash "$i"
done

However, this script that uses a variable for the destination folder does not work.

read -p "Enter destination folder: " destination

for i in "$@"; do
    cp -a -R "$i" "$destination"
    gio trash "$i"
done

Error when I enter ‘/home/userxyz/Downloads/folder1’ as destination:

cp: cannot create regular file "'/home/userxyz/Downloads/folder1'": No such file or directory

Similarly, this works:

for i in "$@"; do
    rsync "$i" '/home/userxyz/Downloads/folder1'
    gio trash "$i"
done

But this does not work:

read -p "Enter destination folder: " destination

for i in "$@"; do
    rsync "$i" "$destination"
    gio trash "$i"
done

Error:

rsync: change_dir#3 "/home/userxyz//'/home/userxyz/Downloads" failed: No such file or directory (2)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(720) (Receiver=3.1.3)

I have confirmed that ‘/home/userxyz/Downloads/folder1’ exists. What am I doing wrong?

photo editing – How to move mutluple layers to another tab in Photoshop

I usually don’t work with photography, so I apologize if my question sounds stupid, but I am doing a small project, and I need help with Photoshop and layers.

I have one image with multiple different layers and groups. I would like to save everything as one and move it to a new tab in the same Photoshop window. Is it possible to use the project with layers in the second tab as a whole, but if I modify something on the original tab, that the copied “image” on the second tab is automatically updated, so I don’t need to save the first image every time and manually import it to the second one? Or is there any other solution for this?

Thanks in advance

magento2 – How to move “The shipping and billing addresses are the same” checkbox to billing step in Magento 2

In my website,On one page checkout, the “My billing and shipping address are the same” section is showing after the payment method. I want it to show below the Billing address. The payment method will stay at its own place. I just want to move the checkbox into the billing address section.
How can I achieve this?
enter image description here

dnd 5e – Can an Echo Knight fighter’s Manifest Echo move through another creature’s space?

No

It’s not immediately clear, because the echo knight is not a creature, but some particular attributes are ascribed to it that are normally only ascribed to creatures.

There are several reasons for which we might state that the echo can occupy another creature’s space:

1. The Echo isn’t a creature

The basic rules impose the following restrictions on player movement, which are assumed to extend to all creatures, except in the case of exceptions:

You can move through a nonhostile creature’s space. In contrast, you can move through a hostile creature’s space only if the creature is at least two sizes larger or smaller than you. Remember that another creature’s space is difficult terrain for you.

The echo projected by an Echo Knight is not a creature, so this restriction does not apply to it.

2. The Echo doesn’t have a movement speed

None of the rules for movement, including the above, can be applied to the echo, because the echo does not ‘move’ in the way that creatures move. It has no speed of any kind, and moves ‘up to 30 feet in any direction’ when mentally instructed to do so by the Echo Knight. This movement includes upwards movement and is more akin to a caster moving their Mage Hand than to a creature expending their movement to traverse space in a physical way.

3. The echo is ethereal

Even if the Echo weren’t a creature and didn’t have a speed, it might still be constrained by the common sense adjudication that corporeal bodies cannot pass through one another freely. The echo, however is:

a magical, translucent, gray image

An ‘image’ is an ethereal object, which means that the echo can pass through creatures and objects alike.

But…

All of the above is overwritten by the ruling that the echo:

… is the same size as you, and it occupies its space.

‘Occupy’ and ‘space’ here are not meant in their most general sense, but are mechanical terms usually reserved for creatures. So whilst the echo is not a creature, it inherits the capacity of creatures to occupy space, and the restrictions of space-occupation which come with them. Whilst these rules refer explicitly to creatures being unable to occupy one another’s space, they are extended to the echo because the echo is a space-occupier even though it’s not a creature. This is a difficult edge case brought about by poorly written rules.

dnd 5e – Can another creature move through the Echo Knight fighter’s Manifest Echo’s space?

It is unclear, so the table needs to decide

Unfortunately, this mechanic of the Echo Knight is incredibly unclear as to how to adjudicate these things for moving it. I have reviewed other potential similar mechanic like spiritual weapon or telekinesis, but none of those have the same properties of the Echo Knight.

Which leaves us with a giant shrug as to what to do. In these cases, it comes down to the player talking to the DM about what they feel is fair, reasonable, and fun. There is no ‘wrong’ answer here, but you should think about the potential consequences for each decision.

Looking at how this might affect gameplay of movement, positioning, and battlefield control, it’s important to think about the edge cases – but you’re not going to cover them all. And that’s okay! When they come up, discuss together and be reasonable. If the DM provides an unhappy result, table the argument until after the game and discuss why you didn’t like it and what you think a good compromise could be.

Prepare in advance

Given the lack of clarity about this subclass in general, if a player is considering choosing it then they should discuss these issues with the DM prior to playing. Making sure everyone understands the gray areas, what ambiguities need to be agreed on, and that judgments may come up that require an immediate ruling will go a long way to to mitigating any unhappiness and setting the expectation that this subclass is a little loosey goosey.

java – How to bring user back to the app after move him to Settings.ACTION_MANAGE_OVERLAY_PERMISSION

When the user first time open up the app, I run the below code to get the display overlay permissions

private void checkFloatingPermission() {
    //Check if the application has draw over other apps permission or not?
    //This permission is by default available for API<23. But for API > 23
    //you have to ask for the permission in runtime.
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !Settings.canDrawOverlays(this)) {


        //If the draw over permission is not available open the settings screen
        //to grant the permission.
        AlertDialog.Builder temp = new AlertDialog.Builder(this);
        temp.setMessage("Display overlay permission for floating widget");
        temp.setCancelable(false);
        temp.setPositiveButton("OK", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
                        Uri.parse("package:" + getPackageName()));
                startActivityForResult(intent, CODE_DRAW_OVER_OTHER_APP_PERMISSION);
            }
        });
        temp.show();

    } else {
        Toast.makeText(this, "floting permission already given", Toast.LENGTH_SHORT).show();
        initializeView();
    }
}

but when he/she gives the permission and press back (So that to return the app) it just crashes or I say it just moves the user to his home screen and when a user opens the app again everything works fine if he has given them permission.

I want user to move back to the app after he press’s back button, no matter if he gives the permission or not but he should be able to move back to the app

unity – Move object to mouse direction without raycast?

unity – Move object to mouse direction without raycast? – Game Development Stack Exchange

computer architecture – The following problem Decidable? If a Turing Machine M, on input w, will M ever move its read/write head to the left?

Decidable? If a Turing Machine M, on input w, will M ever move its
read/write head to the left?

I think the problem is decidable. We simulate M for |w| steps. Either it has moved to the left (accept) or otherwise, M never moves left on w (reject). In the latter case, M is making a single pass on the string. It eventually finishes reading w and starts reading blanks/spaces. We simply look at which state q M is in when it finishes reading w and look at the subgraph of states that M visits on reading spaces. None of these should ever involve moving to the left. Thus, we reject it.

Does my logic make sense?

move SER and Captcha breaker to other PC/server?

How do I move both programs to a other pc or server? Can I just copy/paste the the folders or do I need to install the programs? If so, can I import my projects in to the new installation?

Thanks!

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123