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

How do I ignore gravity when using Rigidbody and always have the same jump...

Hello. I want to use rigidbody.AddForce, however I want it to be unaffected by gravity and always have the same jump force.

View Article


Why can't I get AddForce or Velocity work?

I'm trying to get my character to jump in my game. It's a third person game, and although she will jump when I play the Jump animation, I want to be able to control her jump height so she can jump over...

View Article


How do I figure out the end location of a moving object.

Hi, I am trying to figure out the end point of a trajectory object once force has been added. Ideally, when struck with a bat. I have tried using real world physics questions and my code below works...

View Article

myRigidbody.MovePosition influences the force.

Hello, somehow this part of my Code: > myRigidbody.MovePosition(targetPosition); influences this one: if (Input.GetMouseButtonDown(0)) { myRigidbody.velocity = Vector2.zero; myRigidbody.AddForce(new...

View Article

AddForce not pushing back my RigidBody2D

I am trying to add force in the opposite direction of my colliding object (in this case the player). I've scrolled through a dozen of answers but they seem to give me no results. AddForce simply...

View Article


Physics-related touch input (Continuous)

Goodmorning everybody! I searched a lot to find a precise answer to my problem but unfourtunately i can't find it. I would like to hear tips from more experienced users. I want to add a **force**...

View Article

How to calculate GameObject's velocity from AddForce.

Hi all, I have some questions for Unity physics. I want to know about GameObject's the velocity with the AddForce. for example, If a GameObject was added Rigidbody. ( for example a ball ) And I did...

View Article

Physics-related touch input (Continuous)

Goodmorning everybody! I searched a lot to find a precise answer to my problem but unfourtunately i can't find it. I would like to hear tips from more experienced users. I want to add a **force**...

View Article


Assets/Script/PlayerController.cs(22,3): error CS1525: Unexpected symbol `rb'

I am following a tutorial and i have followed it to a "t" but this is the error i am getting ***Assets/Script/PlayerController.cs(22,3): error CS1525: Unexpected symbol `rb'*** This is my current...

View Article


Simulate perfect circular motion with addforce

Hi, I,m trying to simulate circular motion in unity using different value of force. However, I can't actually perform a perfect circular motion using the AddForce() function. Like, when the velocity of...

View Article

Add force up up in local space?

Hi. I've recently started to make my own flying game. So at first things went smoothly, as I can control the plane in terms of pitch, yaw and roll. However, things went awry when I tried to simulate...

View Article

how get bow to add more force over time

hi I'm got the bow to shoot but I want it to add force over time like how it is in real life public class Shoot : MonoBehaviour { [SerializeField] private GameObject arrow; [SerializeField] private...

View Article

Ball movement

I am a new beginner and I am learning how to write a game. I want to move a ball and keep it in constant speed. I don't know why my ball will decrease it speed or even stop moving when it is stuffed...

View Article


AddForce in direction of different object?

Hey guys, I'm trying to shoot a projectile out of the end of a gun but can't seem to figure out how to get the rotation right when I'm adding force to it. Here's my code: http://pastebin.com/kEpr9TuU...

View Article

Jump problem

Hi, I am having trouble making a jump which allows the player to either hold the screen to jump continuously or tap the screen once and just jump once. My script below is what I am using but since...

View Article


Can't apply AddForce after Instantiating object

I've been trying out different methods for a shooting script to try and make it as versatile as possible. I've decided on something like this: public GameObject bullet; public float bulletSpeed =...

View Article

Character falls through spring (and floor sometimes)

Hi guys, could anyone help me out here? When my character touches a spring object, he flies up into the air as expected, but when he comes back down again, he falls through the spring and does nothing,...

View Article


Lack of accuracy while spawning an effect on a rotating sphere.

Hello, I'm trying to spawn a particle effect from a player sphere that rotates in world space. I'm on the good way to achieve this but as we can see on the two following screenshots, it's quite...

View Article

Unable to AddForce on a game object containing a RigidBody2D and a HingeJoint2D?

I have a game object which contains a HingeJoint2D and a RigidBody2D. I've also attached the following debugging script: void FixedUpdate() { if (Input.GetKey(KeyCode.Space)) {...

View Article

Test if a bullet will hit before shooting it?

Hello! I am making a tower defence like game. With enemys that can shoot the player. But. I want to make sure the bullet will hit before shooting. I am already raycasting. But. I am using addforce to...

View Article
Browsing all 1264 articles
Browse latest View live


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