Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Add Force when level loads

$
0
0
#pragma strict function Awake () { if (Application.loadedLevelName = "menu") { Rigidbody2D.AddForce(Vector2.up * 100); } } I am currently making a 2d game which I am designing the menu for. For my background, I have dots floating around. To do this, I added colliders past the edges of the screen. However, this code block will not run. If anybody can find errors it would be greatly appreciated. Thank you

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>