Skip to main content

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
2 answers
2k views

To Unity Rigidbody move like Character Controller on collision

I want to a blue ball moving like a figure. in CharacterController, it was possible. but in Rigidbody, object was stucked. help me.
mjk6026's user avatar
  • 246
1 vote
1 answer
447 views

Copy velocity of one object to other object

I have a script to pick up items with a VR controller. I connect the object to the VR controller through a FixedJoint on a rigidbody ...
Mll Craenen's user avatar
0 votes
2 answers
72 views

How to avoid an applied force from effecting one particular Rigidbody2D

I am creating a 2D side-scroller car race game with zombies. In this game, I set up a feature through which the player can shoot the zombies from the car, as well. The problem is that when I apply ...
Adnan Nazir's user avatar
4 votes
1 answer
2k views

How do I add a smooth force my player's rigid body, to make them jump?

I am trying to add force to the player's rigidbody, when the screen is held. I've written the following code: ...
Piina Kansara's user avatar
1 vote
2 answers
223 views

Unity2D - move rigidbody object with collision

How do I move and collide my object (position given by touch or click), by Using rigidBody2D.MovePosition i can only teleport my character, and by using velocity, my character keeps moving, I want him ...
BrianCas's user avatar
  • 121
1 vote
2 answers
956 views

Unity2D - collide with objects while moving to a position

How do I get my character to collide with other objects while moving to a position? All I've managed to do is change the position, it only collides if the character is not moving, it's like he is ...
BrianCas's user avatar
  • 121
1 vote
0 answers
51 views

Kinematic rigidbodies push each other in unet

https://youtu.be/j3f44E-ExLc I have a bunch of rigidbodies on each player, ALL set to kinematic. And this stuff happens. All the sword swinging is animation state driven, and basic back and forth and ...
bobmaxine's user avatar
2 votes
1 answer
1k views

How to add constant force to player with sperical gravity planet.?

I have a planet and character. My player move perfect around planet with pressing key like 'w','s','a and 'D'. I want to move my player on every frame with same force around sphere. I try plane ...
mahesh's user avatar
  • 45
1 vote
2 answers
154 views

Changing speed of an object

Is there a way of changing speed of an object at certain time? I want to change my speed to my initial speed after colliding with any object. I have already added bounce Physics to my colliding ...
Mazim Arif's user avatar
-1 votes
1 answer
899 views

How to give a mesh collider gravity 5.0

I was trying to make a simulation of an object that needs gravity to work, a hydraulic movement-assistance system for disabled people. All parts are aligned properly, all objects have mesh colliders ...
parseguy's user avatar
0 votes
2 answers
70 views

Moving towards and switching targets in Unity with collision

I have these nodes set up for a ship to move towards over time with out looking stops then repeats in a sequence. like so: 1 2 3 1 2 3 1 2... THE PROBLEMS i keep having either come from the ...
Ryan Henry's user avatar
0 votes
1 answer
542 views

Bullet: Apply any Transformation to RigidBody?

I'm using Bullet for CollisionDetection. I load a scene from a Collada-File using Assimp. Let's say I want to give every object in the scene a RigidBody with a box as CollisionShape. Right now I first ...
SpiRyu's user avatar
  • 16
1 vote
0 answers
426 views

Constant orbit using Rigidbody in Unity

I'm trying to make a few game objects (moons) orbit a planet in unity. Basically just picture a planet in the center of the screen, and a few small moons that orbit the planet with a constant velocity....
DRiFTy's user avatar
  • 586
1 vote
1 answer
6k views

Unity 3D Move Object with RigidBody

I have added RigidBody component as well as Mesh collider to an object moved with keyboard. I know that it the object will go through another (with RigidBody and Mesh collider too) if I use transform ...
Ivan's user avatar
  • 11
0 votes
1 answer
117 views

My bullet keeps going up

So I have a bullet script that fires a bullet straight in the Y direction that gets called as the bullet is instantiated. The plan is to always shoot in the same direction, straight in the Y, but to ...
Thusoluminati Al-Zawahiri Khar's user avatar
1 vote
0 answers
453 views

How to convert the unity standard assets first person controller to rigidbody?

I'm using the standard assets first person controller but I just realised I need the rigidbody controller instead. I don't want to switch them out though because I've made a whole bunch of ...
mr-matt's user avatar
  • 2,759
0 votes
1 answer
306 views

Wwise with Unity Rigidbody 2d or Collider 2d

I'm half way in making a 2D game in Unity and found that Wwise needed the game objects to have a normal 3D RigidBody, since that's quite some work to replace everything, is there any way around?
Charles's user avatar
2 votes
1 answer
722 views

How to replicate Unity's Rigidbody.AddForceAtPosition in C++?

I am trying to replicate the function Rigidbody.AddForceAtPosition of Unity in C++, it means, to apply force to a body offset from its center. How could I achieve that in C++?
Ron's user avatar
  • 23
2 votes
1 answer
477 views

Unity rigidbody exhibits a premature max speed

In effort to build a racing simulator, I have been working on a working model for the pistons in the engine, and have come to a bit of a stand still. I have gone through extensive testing, through ...
Gnemlock's user avatar
  • 5,273
2 votes
2 answers
487 views

Rigidbody2D Circular Orbiting

I am trying to create a basic solar system in 2D. All space objects has CircleCollider2D on them (which are required for raycasting in another script). Currently planets are childs of stars, and ...
starikcetin's user avatar
  • 5,295
0 votes
1 answer
169 views

Unity - Copy another object's Y location?

I'm creating a Pong clone inside of Unity and was trying to figure how to copy another object (In this case being the Y co-od of the Ball Object) How would i go about doing this? I'm using vectors as ...
Ulivax's user avatar
  • 33
1 vote
1 answer
827 views

Unity: Adjusting 2D physics for different mobile resolutions

I created a test project to see how different mobile resolutions affects Unity's 2D Physics. They way I handled the resolutions was to contain all the objects (including non-UI objects) in a Canvas ...
Alkhzar's user avatar
  • 21
4 votes
1 answer
224 views

Set input relative to map rotation?

I'm trying to figure out how I can make the input which looks like this : ...
BiiX's user avatar
  • 489
1 vote
1 answer
4k views

Rigidbody AddForce() skipping/teleporting

I'm surprised that this issue is nowhere to be found on these forums... Well at least when I searched. So, on my setup I have created a cube and applied a Rigidbody to the object with the following C# ...
RandomAnimeGamer's user avatar
1 vote
1 answer
180 views

Unity C#: Game Object Movement Issue

I'm trying to move a game object within a set x and y range. I thought the code below would work, but it does nothing. The idea is the player controls the platform and tries to move under the ball. ...
Tony Chacon's user avatar
2 votes
2 answers
2k views

How to apply force to rigid bodys at a specific point?

I am trying to write a physics engine from scratch to get a better understanding of them. It worked pretty good so far, but there is one thing, i can't get my head around: If i have a rigid body ( ...
Alexander Horstkötter's user avatar
1 vote
1 answer
2k views

How to get dynamic RigidBody rotation/tilt on uneven platform?

I have a rigid body with PolygonCollider2D which has some complex circular shape and I'm using uneven platform. Im using Following code to move the object forward ...
user75648's user avatar
  • 181
1 vote
2 answers
2k views

How to make rigid body move smoothly on uneven platform?

Right now I'm using Rigidbody2d for the game character along with polygon collider 2D(2d platform game). I'm beginner hope I'm using correct components. And transform to move character from left to ...
user75648's user avatar
  • 181
0 votes
1 answer
1k views

How to disable Camera from tilting when following a game object?

I have a game character object which is followed by camera. Camera is child object of Character. Using rigid body makes the character tilt in slopes and camera tilts too. how do i stop camera ...
user75648's user avatar
  • 181
1 vote
0 answers
109 views

Rigidbody Projectile Being Suspended In Mid-Air

I am experiencing problems with Unity's Rigibody feature. Whenever I try firing a projectile, it gets suspended in mid-air. The projectiles are stored in an object pool. Below is the code and images ...
n0t_a_nUmb3R's user avatar
0 votes
1 answer
164 views

Ball Speed is not increasing as per code

I am working on small project , but now I have a problem . The problem is The Player speed (Ball speed) is not increasing as per the code . In the beginning ball speed increases , but as the time ...
Nicolus Buck's user avatar
1 vote
1 answer
113 views

My rigid body controller stuck in middle of screen (unity)

Still working on my Star Fox clone and am changing up the camera a bit. The problem I keep having is my Ship gets locked in the middle of the screen and can't move while its parent (spinMe) is still ...
Ryan Henry's user avatar
0 votes
2 answers
3k views

OnTriggerEnter() without rigidbody?

I know this is an old question and it has been answered for a lot of people. Unfortunately none of the solutions apply to the problem I seem to have with rigidbodies. I have a moving AI character and ...
Biggzlar's user avatar
2 votes
1 answer
3k views

Two 2D objects in Unity aren't colliding together

In Unity 5, I have a player shooting a projectile in aim to hit a boss, and inflict damage upon contact with the projectile. Though for some reason, the projectile and boss aren't colliding with each ...
davidpox's user avatar
1 vote
1 answer
5k views

Unity3D RigidBody adding force diagonally (x,y,0) results in two separate movements instead of one diagonal movement?

The intentions of this function are to utilize the RigidBody component from a "target" object and clear its force while applying a diagonal force in the direction upwards and away from the side they ...
RandomAnimeGamer's user avatar
3 votes
1 answer
734 views

Jumping onto higher ground Collider issues

What's the general solution to the following character animation problem (I'm using Unity)? You have a character with a capsule collider and a jump animation that allows you to jump onto higher ...
BadmintonCat's user avatar
1 vote
0 answers
718 views

Character Movement and Collision with Ragdoll Rigidbodies/Colliders?

I have a player character that I'm moving with a character controller script and it is moved by applying velocity to a Ridigbody. This works when I have a ...
BadmintonCat's user avatar
1 vote
1 answer
184 views

Trying to make a respawn trigger, but any rigid body (or collider probably) keeps triggering it. Any ideas?

I'm trying to make it so that if any object passes through with the matching tag it will reload the level. However, any rigid body (or collider) is setting it off which is not the desired behavior. <...
Sie's user avatar
  • 319
4 votes
2 answers
2k views

Unity Ragdoll Colliders don't collide

I have a humanoid character with Ragdoll setup in Unity. However the box/capsule colliders on the various parts of the body don't collide with other static geometry. They do collide with the ground ...
BadmintonCat's user avatar
0 votes
2 answers
838 views

What are the common methods for achieving dynamic asset destruction? [closed]

I am trying to determine the most appropriate destruction solution for an online desktop game. There are two main factors here that I am considering; 1) the performance of the approach taken and how ...
FrontEnd's user avatar
  • 1,707
3 votes
1 answer
1k views

'Ball.rigidbody' hides inherited member 'Component.Rigidbody'

I have some understanding of c# and I am new to unity. I am currently making a 3D project which use the Rigidbody component on the ball object. When I use following code: ...
Pawel's user avatar
  • 133
1 vote
0 answers
3k views

Colliding without physics in Unity: is it possible to put OnTriggerEnter in the moving character?

My main question is: is it possible to put OnTriggerEnter in a script that goes attached to the moving character instead of to trigger area/object? Let me explain my exact need. I want to detect the ...
Louis15's user avatar
  • 569
3 votes
1 answer
4k views

Limiting x and y movement so you can't go off camera

So I want to make an on rails shooter like that of Star-Fox in the Unity engine. What I would like to do is limit the ship from moving off the screen. You move along the X and Y axis so i wont have to ...
Ryan Henry's user avatar
0 votes
1 answer
148 views

How to use rigitbody2d.AddTorque() in JavaScript? (unity2D)

I just want to know how to use rigitbody2d.AddTorque() and an example script would be great :D. I am trying to rotate a cube forever using it as a test.
ElPolloLoco999's user avatar
0 votes
2 answers
151 views

Player in Spaceship

I want to realize space game on Unity3d engine. There are some huge spaceships in the void. So, I want players flying in space in weightlessness, but when they go inside any spaceship, they will be ...
Dmitriy's user avatar
5 votes
3 answers
22k views

How to check if grounded with rigidbody

Does anyone have a better way to make an object with a rigidbody check for ground and then jump, right now I wrote a script where a raycast is cast downwards and it checks for distance but then I ...
John Smith's user avatar
  • 1,255
0 votes
2 answers
1k views

Shooting at mouse in unity

I'm using unity and trying to get my bullet to shoot at a target. I am clicking the mouse and I'm wanting to fire my bullet in that direction. I have gotten the coordinates of the mouse click and ...
magna_nz's user avatar
  • 113

1 2 3 4 5
6