Questions tagged [rigidbody]
In game development, a rigidbody is usually referred to anything that is affected by physics.
217
questions
0
votes
1answer
20 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
33 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
38 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
25 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
22 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
39 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
67 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
21 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
30 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
24 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
101 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
101 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
32 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
36 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
54 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
90 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
11 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
28 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
22 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
35 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
87 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
85 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
113 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
178 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
46 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
400 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
55 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
33 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
26 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
42 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
206 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
582 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
71 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
272 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
20 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
21 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
30 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
25 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
51 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
14 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
21 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 ...