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

Problem with Wall Jump - 2D

Hey Guy! I'm stuck When the player performs a wall jump he sort of teleports to the side first and then moves straight up before falling back down. Here is the method wallJump(); void wallJump(){ if...

View Article


How do I get ForceMode2D.Impulse to work?

Hi everyone! ---------- I'm trying to apply an Impulse force to my Player Character to knock him back when he's being hit by an enemy. I'm doing this inside a separate function inside my player...

View Article


Kicking object with random direction and force 2D

So I`am making a hacky sack game but when i kick the object hit just going up with no random direction and force. And I want my character not to hit the object when running. Here is my code for the...

View Article

Moving rigidbody with addforce, velocity or position causes another object...

I have 4 objects. 1. A UI hand witch is moved by a players hand position using a depth camera. 2. A 3D game object that follows the UI hand in real space so that I can interact with 3D objects. 3....

View Article

Trying to move a character using addforce

I am trying to make a 2d game for fun, but I ran into a problem. This is the script I am using to move and jump. When I try to move it doesn't do anything. I debugged the Vector2 move and it seems to...

View Article


How to add force towards an object with variable degree accuracy 2d

I have a game where I am creating meteors to launch towards a planet in the middle of the screen. Right now I am creating meteors and adding force towards the center of the planet. What I want to...

View Article

Is it possible to have slow acceleration and high drag at the same time?

I'm working on a 2D sideview airplane game in the vein of Sopwith / Biplanes / Altitude, and I'm running into problems getting the movement right. Trying to achieve something similar to what you see in...

View Article

Move object along ray cast using object's AddForce or velocity but not transform

In a FPS game the gun fires bullets towards the moving targets, the bullet path is calculated using **Physics.Raycast(ray, out hit)** method, after that I want that my cloned bullet(using Instantiate...

View Article


cant add force to standing rigidbody controller

Force gets added if controller's moving speed is beyond some threshold, because when you start moving or make small steps, add force still dont work. I just dont understand the problem, controller is...

View Article


Trouble in freezing movement in z axis

Hi everyone! I am making a mobile serious game for forearm rehabilitation; one of the exercises depend on arm extension then moving the arm in the x axis, a ball represents the arm movement and a...

View Article

How to use add force only if the player collides with the object?

@Hellium I have this script where the player is able to parent the ball on collision and up parent it when the mouse button is click. Pressing the mouse button will also add force to the ball. The...

View Article

[C#, 2D] How do I apply force to a player using vector 3 velocity to move

Forgive me if I can't describe the issue well enough, but I'm trying to use AddForce to 'boost' my player forward, but to use addForce i have to suspend my rigidbody's normal movement code, since they...

View Article

Enemies are moving aroung wildly

Hey I'm programming a shooter game, where the characters can only move to the x and z axis. So after a while, I think mostly when the enemies are respawned, the enemies are moving around wildly to the...

View Article


Enemy AI 2D not working? ( Rigidbody.Addforce() )

Having trouble getting the enemy ai to chase the character with rigidbody.addforce(). So far it seems to be sliding around the player like its on roller skates and eventually hitting it. I changed it...

View Article

add force on topdown bullet

I'm making a topdown game where you can shoot bullets that are bouncing of the wall. The player can Instantiate the bullets at his position. The bullets won't move, here is the script that's attached...

View Article


Unity 2017.1.0f3 AddRelativeForce Undefined error

So i have run into an issue when i try to use Addrelativeforce. what i am trying to do is replace this bit of a thing I am working with: https://www.youtube.com/watch?v=gHeQ8Hr92P4 this thing, now the...

View Article

AddForce in z axis

Hi, i create my tank and i want shoot bullets from cannon. I have turret which rotate on Y-axis and in the turret i have empty gameObject whitch represent bullet position. When the bullet is fired,...

View Article


What force to apply to the smash in order to keep the same distance between...

Hey, I'm creating a platform game called "The Fur in Me". In order to defeat your enemies, you have to jump on them, at the same time that you change your color to match your enemies's color. **Notes**...

View Article

,Rotate a gameobject around another while being attracted by its gravity

I have a game object ( satellite ) which is it is being attracted by another object(Sun). the satellite rotates (clockwise ) by holding mouse click, and on space key press(Jump), a force pushes the...

View Article

rigidbody addforce jittering

Please tell me what I am doing wrong, I have a simple scene with a floor, a static camera and a sphere with a Rigidbody, the movement is horrible, I have tried all the solutions I could find,...

View Article
Browsing all 1264 articles
Browse latest View live


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