Drawing path and Throwing objects
Hi guys, I want to create a gameplay in which the player can draw a path in which his avatar can move around (and affect other objects). Alongside, if the player is close enough the another object,...
View ArticleHow to add equal force across multiple platforms
My problem is that when I add force like this rigidbody.AddRelativeForce(Vector3.forward * 100, ForceMode.Acceleration ); based on the computing power of the computer the game in runing on the Game...
View ArticleAdding a force to an object relative to a rotation?
Currently I'm pushing this ladder over by adding a force on the Z-axis using an accelerometer, and it's working just fine. rigidbody.AddForce (0.0f, 0.0f, [accelerometer z-axis]); ![alt text][1] [1]:...
View Article[2D] gravity independant jumping
Sup! I have the following code: void Update() { if(Input.GetKey(Keycode.W)) { OnJump(); } } void OnJump() { rigidbody2D.AddForce(new Vector2(0f, 300f)); } It works fine until i double jump, i mean,...
View ArticleConstant force on 2Drigidbodys
I have a 2D game with a plane. I want this plane to be affected by gravity and have a max speed. right now I'm just using AddForce() and it makes the sprite accelerate indefinitely. I also want to move...
View ArticleHow to measure the force by which Two rigid Bodies collide?
How to measure the force by which Two rigid Bodies collide and in the reaction add force to other object in opposite direction. For example in the cricket game how the force is measured b/w bat and...
View ArticleRigidbody.Addforce against position
How can i use Rigidbody.Addforce, against a position? For example when i press "w" the object with rigidbody.addforce will be pushed against a choosen object.
View ArticleRigidbody.Addforce against position
How can i use Rigidbody.Addforce, against a position? For example when i press "w" the object with rigidbody.addforce will be pushed against a choosen object.
View ArticleProblem with 2 Rigidbodies having respective colliders (2d)
I am making a 2d vertical scrolling platformer, I have an auto-jump script attached to the platforms: public class AutoJump : MonoBehaviour { private GameObject Player; void OnTriggerStay2D(Collider2D...
View Articlerigidbody2D.addForce() question
Hi All I implemented a simple script to activate a coin object (from an object pool) , and add force to the coin so that it moves to the right. The idea is, when I kill an enemy object, a coin will be...
View ArticleRigidbody2D linearDrag - Suddenly Change
Hey Guys! I opened a project I closed 2 Month ago. In that project iam using Rigidbody2D and Addforce. All worked fine. Now, i needed to type in a "linearDrag" value suddenly. Was that a change on...
View Articlerigidbody.AddForce affects all clones
Hello, on scene I have 3 balls with Ball.cs script attached to each of them. And when I push ball with mouse all balls start moving, but I need that only one that I touch moves. Here is my FixedUpdate:...
View ArticleCountering AddForce by Modifying velocity
I'm currently working on an object grabber mechanic using AddForce to move the grabbed object. However, when the camera too fast, the grabbed object will have a enormous speed and fly in a direction....
View ArticleHow to add force to a raycast hit object. C#
Hey guys just wondering as the title says. I am trying to make a mario galaxy kind of mechanic where I am attracted towards a planet that I raycast. I am stuck, if you can give me a little bit of help...
View ArticleRigidbody AddForce Up - different value.
Hello, Why when i use if(GetKeyDown("up") && IsGrounded()){ rigidbody.AddForce (Vector3.up *6000); } sometimes object jump higher then other one? Thanks
View ArticleMaking a player jump, getting random results
Hi, I have written a function in my player controller to make the character jump, however I seem to get pretty random results like every 3rd or 4th jump seems to be higher or sometimes it barely jumps...
View ArticleBouncing Toward Target Point
Trying to create a script that will bounce my bouncy character toward a target point. The idea is to allow the character to 'bounce' on every collision towards the point until they have either reached...
View Articleproblem with adding force
Hi All I implemented a simple script to activate a coin object (from an object pool) , and add force to the coin so that it moves to the right. The idea is, when I kill an enemy object, a coin will be...
View ArticleAddForce on a rigidBody without drift effect (centrifugal force)
Hello Unity community ! I want a sphere which moove in direction of camera forward. That work but when the speed is too high, the drift effect is too strong. When i turn my camera to the right, the...
View ArticleRigidbody2D and AddForceAtPosition
Im trying to make a rocket, and im using an empty gameobject parented to the rocket for the motor position, the point where the force will be applied, here is my code: motorPivot =...
View Article