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
vote
0answers
20 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
30 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
25 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
15 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
25 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
30 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
78 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
31 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
47 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
21 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
21 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
13 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
51 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
43 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
28 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
25 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
22 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
52 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
134 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
33 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
45 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
29 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
154 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
183 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
33 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
47 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
63 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
158 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
12 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
29 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
33 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
25 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
36 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
256 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
128 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
137 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
303 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
56 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
50 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
427 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
69 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
17 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
36 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
27 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
54 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
269 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 ...
1
vote
0answers
743 views

How to Make a Ladder Climbing Script

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 ...
0
votes
1answer
94 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 ...

1
2 3 4 5