Quantcast
Channel: Questions in topic: "addforce"
Browsing all 1264 articles
Browse latest View live
↧

Why is my player loosing force

In my game I have it so the player resets it's position, and it's velocity when it collides with an enemy or the goal, and when it passes a certain point on the z axis, but every time it resets my...

View Article


addforce and timeScale problem

When I use the skill, the timeScale is 0.3 or 0.0, making the time slow and fast. However, as soon as the projectiles (arrows, bullets) are created, the timeScale is changed, or the enemy's next attack...

View Article


addfore and timeScale

When I use the skill, the timeScale is 0.3 or 0.0, making the time slow and fast. However, as soon as the projectiles (arrows, bullets) are created, the timeScale is changed, or the enemy's next attack...

View Article

please help me..... please

When I use the skill, the timeScale is 0.3 or 0.0, making the time slow and fast. However, as soon as the projectiles (arrows, bullets) are created, the timeScale is changed, or the enemy's next attack...

View Article

How to fix player knockback,How to add Knockback on enemy attack

I want the player to experience knockback when the enemy collides with the player. The Debug.log returns "check", butt the player does not move. There are no unity error's. Can anybody help me out?...

View Article


Rigidbody2D AddForce not working

I know this is a pretty popular question, since i have spend the last hour googling how to fix it. I can't get Addforce to work. I tried it in the game i am making, and it didn't work. Now i have tried...

View Article

Hello guys! I want to slow down the player's speed when i let up my left...

**Here is my code so far** private Rigidbody2D rB; private Vector2 mousePos; private float speed = -10.0f; private bool canSlow; // Start is called before the first frame update void Start() { rB =...

View Article

2D Platformer - knockback hindered by player movement

Hey everyone, My problem is that when trying to knock the player back using Impulse AddForce, the player's input overbears the force added. ---------- To better explain the problem, imagine the player...

View Article


Moving a rigidbody object using Addforce, without any overshoot

Hello, I'm trying to create an interaction system similar to the one in Amnesia the dark descent. In the game when you pick up an object it will follow your cursor around while still behaving like a...

View Article


Keep Rigidbody velocity no matter the trajectory.

I have a function that fires a ball in a direction. It gets it's direction depending on the angle between the ball and the mouse position. The issue is that currently if the mouse is further away from...

View Article

How to move character relative to camera using AddForce

I get an error: Operator * cannot be applied to operands by type Vector3 and Vector3 `_rb.AddForce(movement * Camera.main.transform.forward * speed * Time.fixedDeltaTime, ForceMode.Impulse);`

View Article

Problem with AddForce OnCollisionEnter

In my 2D game, I'm trying to knock back the player when he collides with a specific moving object using the code below. The problem is, once the player enters the collision with that object, the player...

View Article

Is there a formula I can use to calculate force needed to achieve a certain...

Factoring in drag and mass of an object. I'm trying to move my rigidbody player at a certain velocity based on their movement input and a set movespeed. Like, I want the speed of the rigidbody to be...

View Article


Different AddForce() Jump Results?

So, I'm using AddForce() to make my player jump. ![alt text][1] [1]: /storage/temp/204375-jumping.png grounded is set to true on OnCollisionEnter() For some reason, whenever I hit space, I get a...

View Article

rigidbody gets stuck on walls when addforce value is large

I want the object to move faster, so I increase the value in addforce but when the value is high, and if the player keeps the key pressed, the object later gets stuck against a wall during a jump one...

View Article


Adding a force to a character controller

So, this is my first unity game, and I'm using a character controller for the player. But now I want to add a dash, and I can't find anything on how to make one with a character controller. Is there an...

View Article

Calculate force necessary for 2D parabolic shot

Hi all, I'm trying to make a 2D game, where a ball will be launched from a starting position towards the mouse cursor, in a parabolic motion, with the cursor acting as the vertex of the shot. As of...

View Article


Add force in a particular direction

my code... public void ShootBubble() { bubble_obj_current.myRB.AddForce(myCannon.transform.forward * forceAmount , ForceMode.Impulse); } this is not moving the ball in the forward direction of the...

View Article

Stopping sky jumping with OnCollision problem

The code seems ok but there is a one problem. when I press spacebar while the player is in air then it falls, the player jumps on the floor even though I did not press the spacebar yet. Can someone...

View Article

How to add Rigidbody.AddExplosionForce to propel my player?

I am currently trying to make a movement focused game and I want the player to be able to drop bombs and the bombs should propel the player away from the bomb using Rigidbody.AddExplosionForce. But I'm...

View Article
Browsing all 1264 articles
Browse latest View live


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