Questions tagged [rigidbody]

In game development, a rigidbody is usually referred to anything that is affected by physics.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Verlet rope between two moving points connected with a spring joint?

I'm connecting two moving rigidbodies using a spring joint in Unity. Between them, a rope will be rendered using a line renderer and I want it to move realistically as the joints move, without physics....
1
vote
0answers
16 views

Large values for Rigidbody Velocity (UNITY3D)

I'm making a simple FPS game. I've come across this problem that I am unable to solve for quite some time. If this is question has already been asked before then do let me know. The problem at hand is ...
0
votes
1answer
19 views

Composite collider 2D mysteriously adds x velocity to player rigidbody

As you can in the gif above there is an x velocity being set in the players rigidbody upon contact with the tilemap surface (Tilemap collider using composite). It was fine when I was using standalone ...
0
votes
0answers
29 views

Player can only dash towards to the top right, but can't in any other direction?

I have a dash mechanic, but it only seems to be working when the player is going up, down, left, right, or to diagonally to the upper right. It won't work diagonally in any other directions, and I can'...
0
votes
0answers
21 views

Preventing player units from pushing enemies, and vice versa

I am using a Rigidbody2D to handle collision between different units. When the player's units encounter one another, they push each other because of the rigid body physics (and that's good for me). ...
1
vote
1answer
34 views

Unity3d Rigidbody movement along slope slowdown

I have a Rigidbody character controller (Unity, C#) which I'm trying to make work seamlessly when walking on sloped ground. I've got it working fine walking up and down a slope by changing the forward ...
0
votes
1answer
46 views

What are the dangers of setting rigidbody velocity directly for movement and what are the alternatives

I'm playing around with Unity, trying to make a neat 3rd person platformer movement system using rigidbodies so that I may in the future implement things like pushing boxes/physics objects, grappling ...
1
vote
0answers
27 views

player softbody

I need some help with a softbody mechanic on a player in unity and I don't know how to approach it yet. I want to try rigidbody collision on individual sections of the mesh, or mess with the cloth ...
0
votes
0answers
27 views

How to move an object faster through an arc - Unity

I'm shooting a ball in an arc, but currently it takes too long to move through the arc, so when I increase the force, it doesn't make the ball move faster through the arc, it just launches the ball ...
0
votes
0answers
41 views

Why my capsule collider sometimes stucks in other colliders?

I'm creating a third person game, and sometimes I face a strange bug that I cannot figure out. Indeed the player may remain stuck in static scene objects, and cannot escape until an angle large enough ...
0
votes
1answer
53 views

Jump script using AddForce not working

I am making a simple jump script by adding a separate script to the character. I got the character from the Asset Store and I have left it untouched. I have searched the solution and similar problems ...
0
votes
0answers
8 views

Help with Ragdoll snapping back to origin

So I have a ragdoll system that is enabled when the player is hit by an enemy. When the ragdoll is enabled I disable the animator, wait 3 sec, then enable the animator and play a get up animation. ...
-1
votes
1answer
27 views

How would I detect a collision between a rigidbody and a static

I have an object with a rigid body. How would I go around detecting collisions between this object and any other object with a collider on it? I know you can enable/disable collision detection (https:/...
0
votes
1answer
21 views

Not able to find the constraints option in the Rigidbody component

I am working on a game tutorial right now and I need to freeze constraints for a model prefab. I add a Rigidbody component and I want to freeze rotations on the x ...
1
vote
0answers
19 views

How to prevent Dynamic Rigidbody2d with large mass pushing another Rigidbody2d into BoxCollider2D

I'm making a prototype for a game idea but hitting a problem :( Quite new to Unity and feel like this should be relatively easy to solve, but keep going around in circles, and hoping to get some help :...
0
votes
1answer
25 views

Collisions and Colliders

Does anyone know how to prevent a gameobject from colliding with another gameobject but can still register collisions? Like a ball that can bounce off of the wall or ground and can pass through the ...
0
votes
2answers
58 views

How do I stop my player or camera from jittering during player movement?

In my game, I have a third person character. The player moves with a rigidbody and has isKinematic set off with interpolate on. In the script, it moves with ...
0
votes
1answer
32 views

How to make Rigidbody.AddForce less delayed in Unity3D?

I'm trying to make it so that when the player in my game moves left or right, he lightly jumps from his current position to his new position. The way I have it set up now, the jump occurs once he has ...
0
votes
1answer
74 views

Tetris block kinematic rigidbodies pass through one another with Transform.Translate

I am trying to build a Tetris 3D game in Unity but I am stuck at getting the different blocks to interact (to detect each other, to sit one on top of the other rather than going through each other). I ...
0
votes
1answer
73 views

OnCollisionEnter2D not working

I am fairly new to Unity2D and am making a 2D platformer to get used to the engine. I am trying to create a platform that moves when the player jumps on it, however, on the script for the platform the ...
1
vote
2answers
41 views

Unity - movement code overriding rigidbody mass?

Unity noob here... I have a basic movement script, but whatever I set the objects mass at it still falls the same speed, floating down off ramps instead of sticking to the floor. I saw some posts ...
0
votes
0answers
48 views

Why is my movement not smooth and jagged?

My game isn't smooth, it runs at 60 fps but has quick lag spikes just under every second. I really can't figure out why. I have a feeling it's to do with my player movement code. My rigidbody's ...
0
votes
1answer
330 views

Rigidbody player controller on moving platforms

So basically, I was trying to make moving platforms. When I finished my prototype, I noticed that the movement on the platform is very wobbly: https://www.youtube.com/watch?v=hmBumsrlHGA&feature=...
0
votes
1answer
44 views

Animating MultiPart 2D Character with RigidBodies

Some background to the question: I am attempting to animate and control a large multi sprite 2D Boss character for a platforming game. Up until this point I had been assigning individual animators for ...
0
votes
1answer
16 views

Why doesn't this movement script work, while the other one does?

Im trying to get a rigidbody2D to move around and got it working with this script: ...
0
votes
0answers
32 views

Making a Rigidbody return to being level

I am working on a game where mouse input affects the torque of the RigidBody but I would like the Rigidbody to return to being level if certain conditions are met. Currently the angling working ...
0
votes
1answer
24 views

How to detect unknown forces on pool re-used rigidbody?

I have a ragdoll which performs dying quite well when it is initialized. But when the same prefab object is re-used by being pooled and recycled, it jerks violently when die. As if some forces were ...
0
votes
1answer
31 views

Object floating on “top” of tilemap

I've made a character design and added Rigidbody 2D and Box Collider 2D to it but when I put it on top of the ground which is in ...
0
votes
1answer
92 views

Set Rigidbody velocity in FixedUpdate() or Start()?

I'm developing a simple 2D game in Unity (balls hitting bricks), so I have a ball and I want to fire the ball to hit bricks. Now, to fire the ball I have to set ...
0
votes
0answers
376 views

Unity3D: Create scripts to climb a ladder

I'm inexperienced and I'm trying to understand the mechanism for using a ladder with my character or climbing over small walls. To move I use a rigidbody not kinematic, but with AddForce. I tried to ...
0
votes
1answer
45 views

collision detection and normals from rigidbody

Until now I've been developing my player character using a Character Controller, but have since decided to switch to rigidbody due to the controller's limitations. In order for my movement code to run ...
0
votes
0answers
21 views

Using an objects velocity to determine if it falling on a player will kill it [duplicate]

I've been attempting to make a falling object kill a player, but i still want to make sure the player can touch and interact with the object to move it around without dying. The code i've made so far ...
0
votes
1answer
153 views

Rotate Rigidbody to face away from camera with AddTorque

I have a camera that rotates around an object with "Look At" . I want the object to rotate to face the direction the camera is pointing (Camera.main.transform.forward) using AddTorque, but I can't ...
0
votes
0answers
19 views

Unity : How to make ships slide around a planet smoothly

I'm making a game similar to galcon/phage wars and I'm stuck at the part where the fleets when travelling from one planet to another,if they hit a planet that is not the target then they should go ...
0
votes
0answers
18 views

Bullet: Mesh dont follow rigidbody transform

My mesh drops after a while when rigid body turns green. Maybe I sound wierd, but I am new to bullet-physics and 3d stuff, and don't know the actual cause ;P It happens on using MotionState. Initial ...
0
votes
0answers
21 views

Why does rb.velocity blurrs background?

My player controller code is bellow. So is my player inspector. This makes my character move yet it blurs the background, but when I use ...
0
votes
0answers
29 views

Torque applies to one wheel, but inconsistently to the other wheel

I have a GameScript class which is derived by another class WheelScript; it is meant to apply torque to a rigidbody in different ...
0
votes
0answers
24 views

Rigidbody with many colliders has strange inertia

I've had some feedback from my game that "gravity feels weird and moon-like". After some investigating I found that some of my objects do indeed behave as though they are on the moon. I can confirm ...
1
vote
0answers
41 views

Unity wall jump issue

I've got a very annoying problem that I have been stuck on for a few days and I can't figure it out. It is for a wall jump. I basically want my wall jump to have a bit of force away from to wall to ...
0
votes
0answers
6 views

(2d) Error pops up when handling enemy knockbackS [duplicate]

So I created some code that will make the enemy take knockback upon taking damage from the player. I put this behaviour inside the EnemyInheritance script so that every enemy I have in the game will ...
0
votes
0answers
12 views

Unity: Stop Rigidbody from moving in one direction [duplicate]

I move a rigidbody by moving the mouse. I want my rigidbody to stop moving in the x direction when it exceeds a certain range. To do that I set the x velocity to 0. If I log the velocity, the x-value ...
0
votes
0answers
20 views

Grappling hook script sometimes causing jitter

I am trying to implement a grappling hook mechanic. My grappling script is attached to my camera that is attached to the player. Sometimes when I try to grapple onto a wall, it causes jitterting ...
0
votes
1answer
32 views

How do I get the player to collide with another object to use as a boundary?

I'm trying to make a simple game where you move a sphere from left/right and try to avoid falling cubes. If a cube touches the player (sphere), the player dies. I'm trying to set up boundaries using a ...
0
votes
0answers
41 views

Rigidbody appears to jitter when placed as a sibling to a First Person camera

In my game, the Player can pick up an object (which gets parented to the first-person camera), or the player can push an object (which is parented to the player, but not their first-person camera). ...
0
votes
1answer
106 views

Unity 2d circle collider not stopping after collision with box collider 2d

I'm using unity circle collider 2d and rigid body 2d but when it hits the box it doesn't stop there but instead just pass through and fall. Can someone help? Circle Collider and rigid body 2d setting ...
1
vote
0answers
115 views

How do I stop my game character from sliding on the ground?

I am working with the latest version of Unity (2019.3.4f1) at the time of writing. I have some terrain, some blocks as obstacles and a player character with some mouse driven motion controls. You ...
1
vote
1answer
223 views

When setting Rigidbody.isKinematic true collider won't work anymore

I have a rigged 2D character and used Collider2D/Rigidbody2D/HingeJoint2D to body parts to implement ragdoll. It works fine, but I needed to run ragdoll physics only when character is dead. So I made ...
0
votes
2answers
360 views

Is it possible to detect a collision between a sprite and a UI image in Unity?

I have a stationary sprite with the tag "Player" with a Rigidbody2D (dynamic body type and discrete collision detection) and circle collider 2D. I also have a moving UI image; also with a Rigidbody2D ...
0
votes
2answers
65 views

How to calculate the post Rigidbody2D velocity vector before applying a specific force in Unity?

I am trying to implement a space rocket in 2D. Whenever the player presses a button, a constant force (Both vertical and horizontal) is being added to that rocket. What I want to add is a maximum ...
0
votes
1answer
170 views

Can a GameObject be both 2D and 3D?

In all Unity games I saw so far, every object is either 2D (with RigidBody2D and Collider2D components), or 3D (with RigidBody and Collider components). This makes sense, but I wonder if there is any ...

1
2 3 4 5