Is it possible that colliders can be run through which too much force?
I execute an rigidbody.addforce(transform.forward * 5000) and this object runs right through a collider. How do I prevent this? I want the speed with which the addforce does. TIA.
View ArticleRigid body not moving
When I disable the rigid body and use transform instead it moves fine. I have tried turning kinematic on/off and it doesn't make a difference. When I play the scene my character drops showing that it...
View ArticleAddForce moves my char to fast up
Hey, I'm creating a 2D game. I have done my charController, but I ran into a problem. For my jump funktion I am using AddForce. When I am jumping, my char jumps to fast up. I know that I can setup how...
View ArticleAddForce applies different amount on Android than PC
My player jumps much higher on android device, than it does on PC. Here is my Jump code for my player: public void jump(){ if(gScript.getJumpCount() < 2){ rigidbody.AddForce...
View ArticleHelp on Player Movement Script C#
Hi, I'm having some difficulties with moving script. Wanted behavior is that Player object can move in all directions, and gravity is 0. Also speed of the object should decrease slowly, so I tried to...
View Articlecalculate time to reach a target of rolling rigidbody sphere
Hi all, This is a physics and maths question. I have a sphere rigidbody that rolls along the floor towards a target when I apply a force. And I would like to calculate the time (in seconds) it take for...
View ArticleAdd Force to the right of the rigidbody, not right of the screen
Using addforce to a rigidbody with vector3.right causes it to move right, even if it is rotated. My question is, how can you get the rigidbody to move from its angle. For example: ![alt text][1] and...
View ArticlePlayer isn't moving (AddForce) (Hook)(c#)
I created a little script that shoots simple spheres as hook. When the hook hits something, it stop moving. And now the player should get pulled to the "hook", but nothing happens... Here is the Code,...
View Articlerigidbody2D.AddForce() not working on iPhone
I tried the following line of code in both Update() and FixedUpdate() rigidbody2D.AddForce(new Vector2(0, 1000)); This works fine on my PC and Mac builds, but when I put it on my iPhone is does not...
View ArticleRigidbody-based spaceship?
Hello! I am working on a unique racing game set inside anti-gravity tunnels. My player can yaw with the "horizontal axis" and pitch with the "vertical axis". The player accelerates in the direction...
View ArticleAddforce to gameobject i am colliding with
Hey i want to add force to instead of this.gameObject something like that.gameObject . So i add force to the gameobject that is tagged as box if i collide with it. feel free to clean the code if there...
View ArticleShoot logic, bullet instantiation
Hey ! I'm having a issue when I want to instantiate a bullet going from my gun and to infinity. The bullet gets the right rotation from the code, but not the right force added. Can anyone help me out ?...
View ArticleHow to apply knockback on collision (2D)
Here is the code for my player movement: function Update () { animator.SetInteger("Direction", 4); if (Input.GetKey(moveUp) && isGrounded == 0) { rigidbody2D.velocity.y = jumpheight; isGrounded...
View ArticleNot understanding how rigidbody2D.AddForce works
I know this has been asked before but I'm not able to find any answer that's not too technical or vague for me (I'm really new to coding). I'm creating an Asteroids-like space shooter using Unity's 2D...
View ArticleRididbody movement at the end of a rotating platform
![alt text][1] The blue block is my player. The green block is the goal. I am using a rigidbody and adding force to make the player move. If the players velocity.magnitude is less than maxSpeed then...
View ArticleAddForce makes cube
Okay - so I have got a problem with addForce. At the moment my character is a cube which is moving around in a 3-dimensional space. However when it is on the floor it starts to roll instead of slide. I...
View ArticleForce on one axis only
Hello, I have a moving rigidbody and I want to apply force to only one axis of it. If I use the AddForce, then it just "adds" up the force and not completely resets old one and applies the new one. Any...
View ArticleForce on one axis only?
I have a paddle(platform) like in breakout/arkanoid game, and once a ball hits in a specific location(left/right) then I want to have ball move with certain force on X axis. This code is working...
View Articlerigidbody2d addforce for moving gameObject not work
Hi everyone. My english is bad, but I will try to tell you about my problem. Code (C#): void FixedUpdate () { on_tram = Physics2D.Linecast (on_tram_left.position, on_tram_right.position, 1<<...
View ArticleFoces only change during collision
I am trying to control a cube with the keyboard inputs. I want to change the acceleration of the cube while it is in the air, but the applied forces will only update during a collision or if I set the...
View Article