Add force look at
I'm making a game with missiles which are going to follow the player. How can I make the missiles point at the player using add force instead of look at because look at looks kinda unrealistic I want...
View ArticleRigidbody2D.Addforce results in unrealistic force
So i've spent a lot of time trying to figure out how to code the bounce into unity, but i can't seem to find the best answer related to this case. I hope i can explain as much as possible. Ultimately...
View Article2D Shooter - shooting forward at the current rotation
Hi! So I have a script where i rotate an enemy to face the player.Then I want the enemy to shoot a projectile at the angle the enemy is.I have tryed alot of different codes from the internet to shoot...
View Articledifferent beetween transform.translat and rigidbody.addforce?
Hi i am beginner in unity, and i would do some movement to my gameObject but i don't understand what is the different beetween transform.translate and rigidbody.addforce and rigidbody.velocity...and...
View ArticleAdd force problem
So, i'm making flying physics for spaceship... What i want to do is when i hold W, i want the force to push me from it's back, so when i rotate his nose to up, it's gonna start pushing him up... Right...
View ArticleKnockBack Effect.
Hello everyone. Im building a 2D small game. I've created an object in the middle of the screen. I've created a button that spawns 2 types of balls that moves towards the center. Green and Red balls....
View ArticleRigidBody2D - AddForce - KnockBack Effect.
Hello everyone. Im trying to create a knockback effect. So, I have 2 gameObjects. 1)Player 2)Ball What I want to accomplish is to randomly create a ball that moves towards the player, when hit, the...
View ArticleHow to find speed in certain direction?
So I know to find rigidbody(2D) speed you do this Speed = rigidbody2D.velocity.magnitude; I would like to find out how to do it only to the left. So find out just the speed moving across and not up. Is...
View Articlerigidbody2D.AddForce only applying after object has been dragged...
So I'm trying to fake a little wind effect on an object who is suppose to dangle in the air by using AddForce, it is working however the problem is that it only start to simulate it when I drag the...
View ArticleGlider physics with AddForce 2D
Hello! I am making a game where the player is using a "glider" in 2D space to fly, i would like to achieve the effect of "gaining speed" when rotating downwards, and then when rotating upwards you...
View ArticleHow to jump in a 2D world?
I have setup my game in 2D. I have created an isometric view with graphics. The hero can walk left, right, north and south. I move it using translate. I wanted the character to jump in those directions...
View ArticleRigidbody Player AddForce issue
I am making a simple player controller using a rigidbody and AddForce to control him. The game is first person and I am running into an issue of moving the player. When I turn the camera even slightly,...
View ArticleEnemy shoot at player in 2D game
I have a script I was intending to put on an empty game object in front of the enemy AI, however I am getting a lot of errors. These are the errors: Assets/Meep/Scripts New/enemyshoottest.cs(16,71):...
View Articlerigidbody addforce behaves different every time
i am using addforce to throw objects but object travel distance changes every time sometimes it goes 5 units sometimes 1 not sure why
View ArticleHow can I match Unity's gravity implementation per object?
Hello, I have a character that needs to change gravity and I'm trying to duplicate how Unity is applying gravity since the character has to use a consistent gravity speed as the other rigidbodies in...
View ArticleAddForce doesn't follow rotation
Hello, I have a problem with AddForce. It will always shoot like the original angle was (which means if I turn 90 degree on the left it will look like I shoot the rock not straight but at a 90° angle)....
View ArticleHow could I use AddForce() towards another Object without using...
I basically want a comet to shoot towards a planet but I want the comet also to rotate. I've looked around and lots of people are saying to use transform.LookAt and then rigidbody.AddForce...
View ArticleRotate object towards target without influencing AddForce
Hello, I want my zombie to walk towards my player. I already solved this. Now i want that the zombie not only walks toward my player, but also look at him. First my moving script (I use a rigidbody):...
View ArticleChange Direction of AddForce axis ? (Solved)
How would I change this code so the 'force' is on another axis? e.AddForce(TeethSpawn01.forward * 50); Currently its moving along the Z axis but I want to change it to the X axis. ???
View Article2D Rotate towards GameObject acting odd.
Hey, I am having a problem with a 2d (air)plane I am working on. It is a side scrolling game, and I want the plane to follow the player. To move I am using the rigidbody2D and to rotate I am using...
View Article