raycasting – How can I offset a raycast a certain distance from the camera no matter which way it is facing?

I am raycasting from the camera, which allows me to get the object that the player is looking at within a certain range.

The issue I have is that the camera can be zoomed out away from the player, so the raycast can come up short and I need the raycast to be a very specific length.

So I thought that if I get the distance from the camera to the player, I can then offset the starting position of the raycast, and this would also prevent objects getting returned between the camera and the player.

  • Line A is what I am doing right now.
  • Line B is what I get when trying to offset the raycast.
  • Line C is what I want to achieve with the raycast.

Here is my current code I use for raycasting from the camera without trying to offset it. I tried adding the dist to the start but I think I need something else but not sure.

dist = camera_position - player_position
start = camera_position
forward = camera_rotation * Vector3.Forward
end = start + forward * 500

visas – Does it matter if I don’t have recent Schengen stamps in my passport an EU residency permit holder?

I have a slightly strange situation. I am a non-EU citizen, and a resident of Milan. I am currently in Spain doing an internship as a visiting PhD student, and it is supposed to end around mid July.

Since I am a non-EU citizen, I went in February to get a Spanish type-D visa, so I can enter Spain and do research activities. I was granted a multiple-entry visa for 6 months. It ends in August 2018.

I had at that time the permesso di soggiorno, and it is valid until June 20. I also visited Milan in April and I applied for a renewal and I have with me now the ricevuta (a receipt that confirms you are waiting for the renewal of your permit of stay). I am able to stay in Spain beyond June 20 since I have the visa.

Every time I entered Spain recently, my passport was not stamped, since I was coming from Italy to Spain.

On July 1, I am traveling to Romania to attend a conference for 5 days. With my multiple-entry long-term Schengen visa, it seems that I can enter Romania (on that date I will only use my visa and I will not use my permit of stay since it will be expired).

But I never had my passport stamped when entering Spain previously, and now it should be stamped when leaving Spain to Romania, and as well when leaving Romania and coming back to Spain.

Is this an issue that I am leaving from Spain and my passport was not stamped on entry in Spain? Will I be asked about this? And in case I was asked, should I explain that I had a valid Italian permit of stay and that I entered Spain through Italy and that is why it was never stamped?

eTA for Canada – does the space in the passport number matter?

eTA for Canada – does the space in the passport number matter? – Travel Stack Exchange

external sd – .nomedia + SD Card – just can’t create the file, no matter what

I have an ASUS Zenfone 7 Pro phone running Android 11. This phone comes with an SD card slot and so I wanted to make use of it. It stored the files great, I can read the files all good. But I cannot make my Gallery/Android System ignore any folder on the MicroSD card.

For example, I have a folder with album previews. These all show up as folders in Gallery – needlessly.

So why I can’t make the file? I don’t know.
If I open Solid Explorer and try to create a new empty file as .nomedia anywhere on the SD card, it will just time out and will fail at the task. I can only force close the app when this happens. Other apps just gave me an error, but nothing specific.

How do I overcome this limitation? Maybe it’s because the SD card is formatted FAT32? But I remember using MicroSD in my old Note 4 and other phones, and they handled .nomedia just fine. What changed? Something Android 11 related?

Does the order of MongoDB search terms matter for query performance?

Does the order of search terms in MongoDB matter? I came across this documentation from learnmongodbthehardway that cautions against the use of $ne and $nin:

If you need to use these [$nin and $ne] ensure you are filtering down using indexes as much as possible and leaving the $nin and $ne terms to the very last part of the query selector.

I always thought that the order of the search terms does not matter. I haven’t produced a rich enough dataset to prove/disprove this.

javascript – Automatically Add Defer or ASYNC to all JS files (no matter where they are located)

I’m looking for a way to automatically add defer to all JS files on my server. While I found a way that seem to be working, I am not sure if this is the best way / best practice 2021 for WordPress?

I am running a test environment on XAMPP with PHP 7.4.x and the latest WordPress (5.7.2). I have debug turned on in wp-config and while I am not receiving any errors or notices, I am again, not sure this is the best way / best practice to do this.

Can someone please review and advise?

I am using this code:

add_filter( 'clean_url', 'auto_defer_all_js_and_jquery', 11, 1 );
function auto_defer_all_js_and_jquery( $url ) {

    if ( false === strpos($url, '.js') ) {

        return $url;

    if ( !false === strpos($url, '.js') ) {

        return "$url' defer='defer";

mathematics – Ray-Triangle Intersection: does the direction of the triangle normal matter?

Remember that A, B, and C come from the normal too. So negating the normal flips the sign of all four terms, making:

-A x – B y – C z – D &= 0\
(-1)(Ax + By + Cz + D) &= 0\
(-1) times (-1)(Ax + By + Cz + D) &= (-1) times 0\
Ax + By + Cz + D &= 0

So you can see, negating the normal still gives us an equivalent equation, with all the same solutions as the original.

The direction of the normal can matter for lighting, but it does not alter the equation of the plane.

The resource you’re using contains an error, though. if $ vec n = (A, B, C)$ is the plane normal, then $D = – vec n cdot vec p$ for a point $vec p$ in the plane. The article you linked neglects that minus sign.

Another way of thinking of this: if your normal is a unit vector, then $D$ is a signed distance from the plane to the origin, along the direction of the normal. If the normal points toward the origin, this signed distance is measured in the same direction as the normal, and gives a positive value. If the normal points away from the origin, then this distance is measured in the direction opposite the normal, and gives a negative value.

Meanwhile, $Ax + By + Cz$ measures a signed distance from the origin to the plane perpendicular to $(A, B, C)$ containing the point $(x, y, z)$.

Since the “from” and “to” are flipped between these two parts, the two values will have the same magnitude but opposite sign for any $(x, y, z)$ on the plane, cancelling out to the zero on the right hand side.

(If the normal is not a unit vector, the same argument applies, except now we’re dealing with a scaled distance – like we measured it with a different choice of units)

webmathematica – How can I plot a hexagon inside this cylinder so that it is always in the same direction as the cylinder, no matter what the orientation is?

How can I plot a hexagon inside this cylinder so that it is always in the same direction as the cylinder, no matter what the orientation is? In addition, the hexagon must always be the same size as the cylinder.

For example, start at the origin (10,9,8) and go to (1,2,3)?

Graphics3D ({Cylinder ({{10, 9, 8}, {1, 2, 3}}, 0.5)}

I tried this:

Table (Show (Graphics3D (Cylinder ({{0., 0., 0}, {0., 0., l}}, 1)), PolyhedronData ({"Prism", 6})), {l, 0.1 , 3, 0.1})

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheapest USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA 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.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Proxyti.com Buy Quality Private Proxies