Questions tagged [rigidbody]

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

Filter by
Sorted by
Tagged with
-1
votes
2answers
62 views

Parent object does not rotate on its own axis with its children. How do I fix it?

My parent object components: Rigidbody2D and the script I shared below. Children(Head, Body, Arm, Backpack...): There is only collider. There is no rigidbody2D. (I want the parent object to use the ...
1
vote
1answer
259 views

Firearm magazine ejection

I am playing around with a VR game where the player can fire a hand gun. When the magazine is empty they can press a button on the controller to eject the magazine from the gun. As its VR, I would ...
1
vote
1answer
32 views

Make a rigidbody walk around a planet

I have my character with a rigidbody and attracted by the planet. I am trying to move it with its velocity. I tried this script: ...
0
votes
1answer
30 views

Why addForce creating some small movement in my game object?

I'm working in a project with Unity 2d where player walks on a small planet. I try to use some code from youtube tutorial to apply gravity to my planet.This code consists of two parts, Attractable and ...
3
votes
1answer
88 views

Why my player can suddenly fly?

I'm working in a project with Unity 2d where player walks on a small planet. I try to use some code from youtube tutorial to apply gravity to my planet.This code consists of two parts, Attractable and ...
0
votes
0answers
31 views

Why does Lerp not reach target if setting rb.position, but setting rb.transform.position works?

I don't understand the logic here. I have the following script which makes a player jump towards a target: ...
1
vote
0answers
23 views

Root Motion animation clipping through Rigidbody objects? (Unity 3D)

I am trying to program a climbing system. Player has rigidbody, ledge has rigidbody. Both also have Colliders, and the Player animator is set to use Root Motion. When Player grabs ledge and climbs up ...
0
votes
0answers
95 views

Sprite jitter on movement with pixel perfect camera and Cinemachine in Unity

I have been struggling to get rid of jittery sprites in my game. I've been pulling my hair out for past 4 weeks trying to fix this issue. So I cooked up a small show case project with my player that ...
-1
votes
3answers
52 views

Object is not moving after collision

I have player and walls. When the player hits the wall, its not moving. This is the code for moving: ...
0
votes
0answers
27 views

Unity 3D - Grappling Gun not making Player lift off the ground at all?

I have the following code (based on https://www.youtube.com/watch?v=Xgh4v1w5DxU but tried to convert to work with world space points for Third Person Character usage): ...
1
vote
0answers
87 views

With Unity, why this character with a rigid body and child element colliders doesn't collide with the floor and go through it?

I got an issue with my character going through the ground and actually going through all other elements with a collider. I'm going to try and show as much as I can of the current state of things. My ...
1
vote
1answer
27 views

Dynamic bridge via joints

When a new object is added to the bridge, the bridge shakes violently, and when objects are added even faster, it breaks. I've tried changing mass and changing time step, but that doesn't solve the ...
0
votes
1answer
44 views

Control does not work if motion is set in FixedUpdate

I made touch controls, but when I set forward movement, the control stops working. ...
0
votes
1answer
63 views

add force to object that has 2 different rigid bodies

I need add force to object that has 2 different rigid bodies and someone said that the best way of this is using fixed joint. The case is this ; I have player object and it has a pusher object that ...
1
vote
0answers
23 views

How to get a consistent behavior for a rigid body hooked platform?

Consider this platform made of RigidBody2D and PinJoint2D objects: PinJoint2D setup is: <...
1
vote
0answers
50 views

How to make a catapult work with physics and colliders?

This should be my final question regarding getting a catapult to throw something in unity. On my last question, someone suggested starting with something simpler (which I apologize for not doing ...
0
votes
1answer
46 views

add random force and direction to rigidbodies every x seconds

i need to add a windForce to multiple rigidbodies, with random direction and random force every x lapse of time. I'm using ...
-1
votes
2answers
90 views

"Rotation Quaternions must be unit length" using rigidbody.MoveRotation in unity

I'm making a game that involves throwing things with catapults. The cup of a catapult needs to use Rigidbody.MoveRotation to let a ball respond to being thrown in ...
0
votes
1answer
91 views

How to Get VR Controller's Velocity in Unity with SteamVR?

Back when I used Unity 2017 and controller bindings weren't a thing, I simply attached a rigidbody to my Vive controller and read out the velocity of the rigidbody to know how fast the player was ...
0
votes
1answer
277 views

How do I adjust my rigidbody velocity on a local axes?

I have an fps rigid body script, code listed here: ...
0
votes
1answer
56 views

Rotating fps rigid body on the Y axis

I'm currently attempting to make a first person character using a rigid body. I am aware that the character controller exists, but I believe my game will be very physics based so it's better if my ...
0
votes
3answers
345 views

Sticking the Rigidbody2D player to a moving platform without parenting & transform fiddling

I have a player entity with Rigidbody2D component and I have a moving platform which is a kinematic Rigidbody2D. Player movement is done by setting it's velocity (...
0
votes
1answer
74 views

Momentum-wise accurate player controls in Unity regarding collisions

First post here. So I am a newbie to Unity and am willing to create a general character controller script to base my future characters. I understand a character's mechanics are pretty design (UX) ...
0
votes
2answers
54 views

How to make the snake bodyParts follow same places and directions as the player on a curved surface?

I try to make a game like the classic snake game but on a round ground (Earth). On a plane, the script works well, but when i moved it on a sphere, the bodyparts (prefabs), are not working good as you ...
0
votes
0answers
23 views

Why does my character slide off of the platform if I'm using MovePosition, but not if I'm setting transform.position

I have a platform which consists of a box collider, a rigidbody2d and a script which moves the platform through waypoints. I also have a Rigidbody2d character which can move around and jump. One of ...
0
votes
1answer
26 views

Applying velocity to parent that ignores children's mass not working

I am making a VR data visualisation app in Unity and I have a parent with many children (just some primitive cubes) that I can toss around the scene by just setting the parent's rigidbody to the same ...
0
votes
0answers
16 views

Circle collider wheels push through polygon collider car chassis

I'm trying to create a simple vehicle and make it run on a terrain (from sprites + PolygonCollider2D). I imported a chassis sprite with ...
0
votes
0answers
112 views

Using add_force and add_torque to turn a RigidBody2D

Godot Scene tree Scene (Node2D) - RigidBody2D (Parent of Sprite and CollisionShape2D initially points to X direction/90 degrees) -- Camera2D When I use ...
0
votes
1answer
56 views

How to make GameObject copy position of other GameObject but react to physics perfectly?

First GO moves by transform.translate (necessary). Second GO needs to move by physics. If I do rb.MovePosition on the 2nd GO like: ...
0
votes
0answers
31 views

How do I move a Unity object with velocity instead of force?

I have a 2d car in Unity that I want to move, but Unity does this using relative force & I want to use velocity. As we know if we add force, an object will move and never stop. I want to use ...
0
votes
0answers
44 views

When I use rigidbody.move rotation, my player sinks

I am trying to implement a simple movement on an object and when I use movePosition from rigid body, the player starts to sink: How can I resolve this issue? Below ...
0
votes
1answer
29 views

Clipping speed when turning without using aggressive drag

I have a Unity project in which I want to control a player in a similar way to Source games, and so far I am clipping each input to the speed in the player's coordinates, by using ...
0
votes
0answers
80 views

How to make two connected rigidbodies pull each other?

I'm making a game in Unity where a ship can connect to a rock in space, and drag it. Both are Rigidbody2D. I want the ship to be affected by the rock like this: If I drag the rock, then stop the ship,...
0
votes
1answer
256 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
63 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
69 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
31 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
40 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
299 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 ...
1
vote
1answer
509 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
47 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
73 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
82 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
458 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 ...
-1
votes
1answer
35 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
44 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
37 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
38 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
846 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 ...
1
vote
1answer
199 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 ...

1
2 3 4 5