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

Smooth 2D collision

Whenever I use transform.Translate(), the player slightly clips through a square while they fall, but rigidbody.AddForce() does not present the same issue. When I use AddForce, however, there is no...

View Article


Rigidbody2d.AddForce behaving odd

I have a ship that shoots a laser. I use something like GameObject laserClone = Instantiate(laser,transform.position+(transform.up),transform.rotation)as GameObject;...

View Article


Identifying a particular script

Hi, I'm creating an fps game...using UFPS. the problem i'm facing here is, if a player jumps on some moving gameobjects, somewhere from my scripts the player gets an addforce and he just fly away .The...

View Article

How to Make rigidbody.AddForce be Less the Further a RigidBody gets from an...

Hey guys, I have an object that needs to slow down the further it gets away from the ground. Using: rigidbody.AddForce (0, 10, 0); works fine, but I need it to be: rigidbody.Addforce(0,0,0) when it...

View Article

Combine iTween with physics acceleration

I am trying to combine [iTween][1] with physics acceleration. ![top view of the path][2] Here is the top view of the path. The brown rectangle is made by a cube `GameObject`, with an `iTweenPath`...

View Article


Local Direction of Vector3

Hello. I guess my problem doesn't make you hard but I want to get understand rotation of Vector3. ![alt text][1] This is my example object. We assume it's in position.Vector3(50,60,70). When I give him...

View Article

Add Force or Motor Torque .. Which is better for creating a car?

Hi guys, I was looking into the unity car tutorial available in the unity asset store. In the tutorial force was applied to the rigid body of car to make it move and also to simulate drag. There is...

View Article

AddForce with 2D Character

I got a character with a 2D rigidbody, the game is an infinite runner. Traps are coming from the right to the left and the player needs to jump above them. Now, I want that if the player hits a trap he...

View Article


Help with a simple shooter

Hello Guys, Apologies if this appears to be a repeated question, but I am using this code and I cannot get the addforce to work on the bullets. Im 100% sure they have a rigid body and I've toggled 'Is...

View Article


Adding force to object hit by sword

Hi, I have an overhead fantasy game in 2D, where the character swings a sword through an arc. I have implemented things with basic colliders and rigidbody2d's, but the results are a little anemic. I...

View Article

Animator stops getting parameters

Hey. I've got my character animated and moving (using addForce). I've got 3 float parameters - speed, angularspeed and combatspeed. I'm using speed when I'm out of combat, and I've got a standard...

View Article

Rigidbody acting weird using AddForce()

This might seems ridiculous but it is what happened. I Created three game objects, attaching rigid body with mass = 10 and drag = 3 and capsule collider to it. Then I attach the following script:...

View Article

Movement stops working randomly

Hi, I'm developing a maze game and currently I'm working on coding the player. So far i've created a simple maze in which the player moves around. I've taken a few snippets from here and there. The...

View Article


Please help finding center of object

I am trying to write a code for a gravity pull towards a planet. I want to use a sphere collider as a trigger to start adding force to the object its manipulating towards the planet. So OnTriggerStay I...

View Article

How to make physics like Angry Birds Space

I am starting a game where I need projectiles to travel around a planet just like angry birds space. I have tried a number of things, movetowards, rotatetowards etc. but have not gotten a desirable...

View Article


C# can i set rigidbody2d to gravitate to point x but not y

i am making a juggling game and need the ball to alway gravitate towards the other hand (so a set point on the x axis) but i want the movement of the y axes to remain as it is with AddForce(or...

View Article

Hold Jump to jump longer

Hi everybody, I need to make my character jump longer when one hold the jump button. I tried a lot of solution but I can't manage to do it. My CharacterController is: using UnityEngine;...

View Article


Roll-A-Ball: AddForce into cameras forward direction. How?

Hello Community! I desperately need your help! I want to make a Ball-Roll game. I'm a beginner with C# and Unity, but I want to learn! I have found code snippets in the Internet, but I don't know where...

View Article

Why is rigidbody.addForce calling a Rigidbody2D function?

I'm trying to write a script that defines the motion of a player-type character in a 3D game by calling rigidbody.addForce, but the console is telling me that there is no Rigidbody2D attached. I'm...

View Article

Trigger doesnt do Speed Booster

Hi everyone, i want that my ball get a speed booster when it crosses an object. For that i did this Script, but when the ball cross the box nothing happens. The box has rigidbody and default box...

View Article
Browsing all 1264 articles
Browse latest View live


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