Im using unity and I want to make a game where you can walk around small planets and the further away you get, the weaker the gravity, so you can go to other planets. All the tutorials so far only work with one planet, how do I code this? Is there anything I can download that does it for me?
a 2d planet in the center, where the players will be able to walk on it and also will be affected by center gravity. planet will be static and there won't be any other planets. so;  Is there a way that I can change the gravity position? yes you can adjust gravity via project settings but I want it to be in the middle x,y,z(0,0,0)  I have tried creating my own gravity but it wasn't very useful because objects wouldnt fall, stand on foot and also in contact with another object they would vibrate instead of standing still. (if they stand on the planet they would vibrate)          private void FixedUpdate() {     foreach(GameObject item in grav)     {         Attact(item);     } }  private void Attact(GameObject gmf) {     Rigidbody2D rgg = gmf.GetComponent&lt;Rigidbody2D&gt;();      Vector3 direction = rg2d.position - rgg.position;     float distance = direction.sqrMagnitude;      float forceMag = (10 * rgg.mass) / distance;     Vector3 force = direction.normalized * forceMag * 10;      rgg.AddForce(force); }   I can create a script that will change the gravity by the opposite of the object's position. this does work but I cannot see any way to do it for more than one object.
why don't we define vector multiplication component-wise? I was just wondering why we don't ever define multiplication of vectors as individual component multiplication.  That is, why doesn't anybody ever define $\langle a_1,b_1 \rangle \cdot \langle a_2,b_2 \rangle$ to be $\langle a_1a_2, b_1b_2 \rangle$?  Is the resulting vector just not geometrically interesting? CUDA Driver API vs. CUDA runtime When writing CUDA applications, you can either work at the driver level or at the runtime level as illustrated on this image (The libraries are CUFFT and CUBLAS for advanced math):   (source: )    I assume the tradeoff between the two are increased performance for the low-evel API but at the cost of increased complexity of code. What are the concrete differences and are there any significant things which you cannot do with the high-level API?  I am using CUDA.net for interop with C# and it is built as a copy of the driver API. This encourages writing a lot of rather complex code in C# while the C++ equivalent would be more simple using the runtime API. Is there anything to win by doing it this way? The one benefit I can see is that it is easier to integrate intelligent error handling with the rest of the C# code. Why do investors pay trillions for minority stakes in companies, when their only potential payback is modest uncertain dividends? I'm struggling to understand the core reason to invest in stocks as a minority shareholder. Majority shareholding makes more sense as you effectively control the company, so you can pay yourself dividends or even sell the entire company at will. You can guarantee your own payback.  However, as a minority shareholder, you don't get to make any of these decisions. You're basically just hoping to eventually, some day get paid, if the majority holders decide so.  Why do so many investors agree to pay now huge sums of money (trillions in total) for something that may eventually pay dividends, and even in the best case, these dividends are only a fraction of the price you paid to acquire these stocks?  The average annual dividend rate for the US stock market is 2%. That means if you bought 100 million worth of shares, you'd have to wait 50 years to recover your investment.  Of course, the most probable way you'd eventually get liquidity for these shares is by selling them to some other starry-eyed investor - which makes the whole thing seem like a giant Ponzi scheme.  Given all that, it's unclear to me why the public is willing to spend so much money to acquire minority shares in companies. Retrieve active locale in Grails application Does a photon exert a gravitational pull? I have a Sharepoint online page on which I would like to remove the blue navigation bar at the very top of the screen (the one with the seach bar in the middle and the button on the left with 9 dots to switch to different Microsoft apps). I have checked all of the header settings and also went into the site settings and modified the search settings. I was able to exclude the site from search results, however the blue bar still remains. Is this possible to remove in a default SharePoint online site without using custom CSS or anything like that? Show $f(x)=x\ln x$ is not uniformly continuous Show $f:(0,\infty)\rightarrow \mathbb{R}, f(x)=x\ln x$ on $(0,\infty)$ is not uniformly continuous.    I think that the general way to prove that something is not continuous in a metric space is to let $\epsilon=...$ and show that $\forall\delta&gt;0$, $d&#39;(f(x)-f(y))&gt;\epsilon$. I can't use the Mean Value Theorem because we haven't gone over it yet.    Here's an attempt: Let $\epsilon=1$. Without loss of generality, let $x&gt;y&gt;0$. $|x\ln x-y\ln y|&lt;|(x-y)(\ln x)|\leq|x-y||\ln x|$...$\delta=\frac{\epsilon}{\ln x}$ and therefore doesn't work for all $x$? How to use multiple HDRIs My question is, how would I make the visible HDRI/Enviroment Map be image 1 and then have reflections as Image 2? If someone can post a node setup, or a .py file that would be great &lt;3 I was thinking maybe using the Is Camera Ray node but I'm not confident it would work, and have no idea where to start. Do indexes work with "IN" clause ISP blocking port 25 My ISP has started blocking port 25 so I can not send email through my dedicated server any more.   I have several options:   Send email through the SMTP server provided by my ISP. Any problems with this? Setup mu server so that it receives email on another port instead of port 25     No one else sends email through my server so it should be OK. How do I do this on a Linux server? Buy a static client IP - these are not being blocked so far.   Which one is preferable? Solve a congruence $1978^{20}\equiv x\pmod{125}$ Which OpenType Math fonts are available? What OpenType math fonts are there available for usage in TeX/LaTeX, e.g. with the unicode-math package?  Here is a MWE which you can use to show off the font.  \documentclass{article} \pagestyle{empty}  \usepackage{amsmath} \DeclareMathOperator\Res{Res} \newcommand*\diff{\mathop{}\!\mathup{d}}  \usepackage{amsthm} \newtheorem{theorem}{Theorem}  \usepackage{unicode-math}  %%% % Set up you text and math fonts %%%  \begin{document}  \begin{theorem}[Residue theorem]   Let $f$ be analytic in the region $G$ except for the isolated   singularities $a_1,a_2,\dots,a_m$. If $\gamma$ is a closed   rectifiable curve in $G$ which does not pass through any of the   points $a_k$ and if $\gamma\approx 0$ in $G$, then   \[     \frac{1}{2\pi i} \int\limits_\gamma f\Bigl(x^{\mathbf{N}\in\mathbb{C}^{N\times 10}}\Bigr)     = \sum_{k=1}^m n(\gamma;a_k)\Res(f;a_k)\,.   \] \end{theorem}  \begin{theorem}[Maximum modulus]   Let $G$ be a bounded open set in $\BbbC$ and suppose that $f$ is a   continuous function on $G^-$ which is analytic in $G$. Then   \[     \max\{\, |f(z)|:z\in G^- \,\} = \max\{\, |f(z)|:z\in \partial G \,\}\,.   \] \end{theorem}  First some large operators both in text: $\iiint\limits_{Q}f(x,y,z) \diff x \diff y \diff z$ and $\prod_{\gamma\in\Gamma_{\bar{C}}}\partial(\tilde{X}_\gamma)$;\ and also on display \[   \iiiint\limits_{Q}f(w,x,y,z) \diff w \diff x \diff y \diff z   \leq   \oint_{\partial Q} f'\Biggl(\max\Biggl\{   \frac{\Vert w\Vert}{\vert w^2+x^2\vert};   \frac{\Vert z\Vert}{\vert y^2+z^2\vert};   \frac{\Vert w\oplus z\Vert}{\vert x\oplus y\vert}   \Biggr\}\Biggr)\,. \]  \end{document}   Here is a similar MWE for ConTeXt.  The images in the answer will only be shown for LaTeX output but the ConTeXt output looks very similar.  %%% % Set up you text and math fonts %%%  \setupmathlabeltext[Res=Res] \definemathcommand[Res][nolop]{\mfunctionlabeltext{Res}} \definemathcommand[diff]{\mathop{}\!\mfunctionlabeltext{diff}}  \defineenumeration   [theorem]   [text={Theorem},    style=italic,    title=yes,    titlestyle=normal,    distance=0pt,    titleleft={(},    titleright={).~},    alternative=serried,    width=fit]  \starttext    \starttheorem[title={Residue theorem}]     Let $f$ be analytic in the region $G$ except for the isolated     singularities $a_1,a_2,\dots,a_m$. If $\gamma$ is a closed     rectifiable curve in $G$ which does not pass through any of the     points $a_k$ and if $\gamma\approx 0$ in $G$, then     \startformula       \frac{1}{2\pi i} \int\limits_\gamma f\Bigl(x^{{\mathbf N}\in\mathbb{C}^{N\times 10}}\Bigr)       = \sum_{k=1}^m n(\gamma;a_k)\Res(f;a_k)\,.     \stopformula   \stoptheorem    \starttheorem[title={Maximum modulus}]     Let $G$ be a bounded open set in $\mathbb{C}$ and suppose that $f$ is a     continuous function on $G^-$ which is analytic in $G$. Then     \startformula       \max\{\, |f(z)|:z\in G^- \,\} = \max\{\, |f(z)|:z\in \partial G \,\}\,.     \stopformula   \stoptheorem    First some large operators both in text:   $\iiint\limits_{Q}f(x,y,z) \diff x \diff y \diff z$   and   $\prod_{\gamma\in\Gamma_{\bar{C}}}\partial(\tilde{X}_\gamma)$;\   and also on display   \startformula     \iiiint\limits_{Q}f(w,x,y,z) \diff w \diff x \diff y \diff z     \leq     \oint_{\partial Q} f'\Biggl(\max\Biggl\{     \frac{\Vert w\Vert}{\vert w^2+x^2\vert};     \frac{\Vert z\Vert}{\vert y^2+z^2\vert};     \frac{\Vert w\oplus z\Vert}{\vert x\oplus y\vert}     \Biggr\}\Biggr)\,.   \stopformula  \stoptext GNOME: supend on laptop lid close no longer works since 19.10 upgrade I'm quite positive that this used to work flawlessly in 19.04 (and past releases) but no longer does after a release-upgrade to 19.10 (kernel 5.3.0-24, ThinkPad X1 Carbon gen 5 in case this matters).  I have the corresponding switch set in GNOME-Tweaks and have also attempted to manually edit /etc/systemd/logind.conf as suggested , namely uncomment and adjust the following lines, followed by a reboot:  $ grep -v '^#' /etc/systemd/logind.conf [Login] HandleLidSwitch=suspend HandleLidSwitchExternalPower=suspend HandleLidSwitchDocked=suspend LidSwitchIgnoreInhibited=yes   (strictly speaking, only the first one ought to be required but, just in case, I also added lines 2 &amp; 3, as well as #4 for good measure...  Looking at the output of systemctl status systemd-logind, I see the following:  Dec 17 17:56:50 x1c5 systemd-logind[8959]: Lid closed. Dec 17 17:57:03 x1c5 systemd-logind[8959]: Lid opened.   So the lid events are correctly detected.  To rule out any issue with the suspend process itself, I have also set my power button to suspend in Settings->Power->Suspend &amp; Power Button, for testing purposes.  Pressing the power button now results in this in the output of systemctl status systemd-logind (after a successful suspend-resume cycle):  Dec 17 18:13:58 x1c5 systemd-logind[8959]: Power key pressed. Dec 17 18:14:28 x1c5 systemd-logind[8959]: Delay lock is active (UID 121/gdm, PID 9215/gsd-power) but inhibitor timeout is reached. Dec 17 18:14:39 x1c5 systemd-logind[8959]: Operation 'sleep' finished.   Bottom line: lid events are detected correctly and suspend works flawlessly - but not on lid close...  Any idea how I can get the suspend on lid-close feature back to life?  I can of course use the workaround with the power button but it's a little too easy to forget and result in laptop overheating in bag etc...  --- edited to add ---  Got a little further courtesy of , although the issue isn't the exactly as described.  Here's a smoking gun:  $ systemd-inhibit --list --mode=block WHO       UID  USER      PID  COMM           WHAT                                                     WHY                                                         MODE  gdm       121  gdm       2231 gsd-power      handle-lid-switch                                        External monitor attached or configuration changed recently block gdm       121  gdm       2252 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block user      1000 user      3017 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block   This suggests that the lid close action is being blocked because "External monitor attached or configuration changed recently".  I do connect my laptop to a monitor using a USB-C cable but as I write this, it's been undocked and running on batteries for nearly 3 hours (GNOME settings only shows my laptop display as available).  However it looks like systemd or whichever component is responsible for this still incorrectly believes the external display is attached and - per the ticket - suspend isn't supported by GNOME in such scenarios...  Interestingly the gsd-power process (PID 2231) is owned by gdm rather than my UID.  Killing it restores the suspend-on-lid-close functionality.  Need to figure out why this process exists... When actually connected to external display, systemd-inhibit --list --mode=block reports a 2nd gsd-power process owned by the interactive user; which appears correct and sufficient. Similar to this question  and an fellow up on this one    What was the official reason by Canonical to axed the project when it was love by some many of their users and innovative? Determine value of the limit:  $$L=\lim_{n\to \infty}\sqrt[n]{1^2+2^2+\cdots+n^2}$$  My try:  $$1^2+2^2+\cdots+n^2=\frac{n(n+1)(2n+1)}{6}$$  Hence: $$L=\lim_{n\to \infty} \sqrt[n]{\frac{n(n+1)(2n+1)}{6}}=?$$  But, come here, i do not know how, because please help me. Can someone use DC generator along with electric motor to make electricity along with mechanical energy? I know this might sound stupid and maybe stupid totally, but I need some clarification....  I came through electric motor principle.  and then I came across the following link on DC generators    Now my question is, can't we combine them both to provide DC current with little DC used in motor side? By "combine," I mean using a DC generator coil only at the other side of the coil of the motor in the motor itself. The condition is that the 2 coils are connected via some apparatus that causes the 2nd coil to move along with the 1st coil.   In this way we can use both the mechanical energy produced by the 1st coil and the electrical energy produced by the 2nd coil, right?   This is a great concept if it works, right? Please throw some light on this. Apache reverse proxy error page when proxied server is down I am using Apache2 as a reverse proxy for tomcat, my configuration being something like:  ProxyRequests Off  ProxyPass        / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/   My question is: can I configure Apache to show up a courtesy page (an "under construction" HTML static page) whenever Tomcat is down? I am new to blender. Pressing &#9096; Ctrl&#9095; AltQ opens the quad view. How to maximize any one of the four views of the quad view? Fraleigh(7ed) Theorem33.12. Let $p$ be a prime and let $n\in\mathbb{Z}^+$. If $E$ and $E&#39;$ are fields of order $p^n$, then $E \simeq E&#39;$.   Proof in the text: Both $E$ and $E&#39;$ have $\mathbb{Z}_p$ as prime field, up to isomorphism. By Corollary 33.6(A finite extension $E$ of a finite field $F$ is a simple extension of $F$), $E$ is a simple extension of $\mathbb{Z}_p$ of degree $n$, so there exists an irreducible polynomial $f(x)$ of degree $n$ in $\mathbb{Z}_p[x]$ such that $E\simeq \mathbb{Z}_p[x]/ \langle f(x) \rangle$. Because the elements of $E$ are zeros of $x^{p^n}-x$, *we see that $f(x)$ is a factor of $x^{p^n}-x$ in $\mathbb{Z}_p[x]$*. Because $E&#39;$ also consists of zeros of  $x^{p^n}-x$, we see that $E&#39;$ also contains zeros of irreducible $f(x)$ in $\mathbb{Z}_p[x]$. Thus, because $E&#39;$ also contains exactly $p^n$ elements, $E&#39;$ is also isomorphic to $E\simeq \mathbb{Z}_p[x]/\langle f(x) \rangle$.  I don't know why $f(x)$ divides $x^{p^n}-x$. $E$ has a zero $\alpha$ of $f(x)$, but it doesn't need to have all the zeros of $f(x)$. So $f(x)=(x-\alpha)g(x)$ in $E[x]$ and $g(x)$ need not be splitted into linear factors. How can $f(x)$ divide $x^{p^n}-x$? I remember being taught that the correct order of adjectives in English was something along the lines of "Opinion-Size-Age-Color-Material-Purpose."  However, it's been a long time and I'm pretty sure I've forgotten a few categories (I think there were eight or nine). Can anyone fill them in?