# Tagged Questions

Rigid body dynamics is the simulation of physical objects which are "solid" and cannot deform or change shape during simulation.

19 views

### How would joints work in an impulse-based physics engine?

I want to learn about physics engines, especially impulse-based ones. So I've followed along this tutorial to create some simple rigid-body physics: http://gamedevelopment.tutsplus.com/tutorials/how-...
41 views

### Handling movement on sloped surfaces - clamping character to sloped surface

I've noticed that a lot of people seem to have this issue but I've yet to find an actual working solution - when a rigidbody-based character controller (I'm not using Unity's character controller) ...
28 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 ...
32 views

### In Unity3D (and PhysX), how do I calculate the products of inertia?

Since unity3d uses physx underneath the surface, obviously they share the same features. One of the features is the moment of inertia tensor - Unity3D one, PhysX one. Though, they use the diagonal ...
87 views

### Calculating the angular momentum of rigidbody in Unity3D

Knowing that angular momentum in 3D is L = Iω (moment of inertia times angular velocity), how do I calculate it in video game world? In unity3d I have the diagonal inertia tensor rigidbody....
71 views

### In Unity3D, what is the relation between inertiaTensor and inertiaTensorRotation?

In unity3d there are two properties on rigidbody that correspond to the moment of inertia tensor. One of them is: rigidbody.inertiaTensor, which I know is the diagonal of the inertia tensor, The ...
100 views

### Bullet: No Bouncing off the walls

I'm using Bullet Physics for Collision Detection in a first person game. The collision basically work fine, I cannot walk through objects. But if I walk against the wall and release the key I get ...
76 views

### Stopping 3D object in place

I am at 1.2 stage (moving the player) at Unity course "Roll-a-ball" and have question: I want to add feature that stops a player and sets his new position on 0, 0, 0. I can reset the position, but I ...
87 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 ...
28 views

### Rigidbody2d and square steps

Well, I am developing small game based on Rigidbody2D character. He should go horizontally, jump and automatically climb on rectangular stairs when walking on them. I know slopes is a possible ...
115 views

### How to destroy bullet on collision but only after it makes the collided object to bounce?

I made a scenario that shooting a bullets on crates make them both bounce nicely (both the bullet and crates are RigidBody2D & Colliders). When I use OnCollisionEnter2D to destroy the bullet when ...
82 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 ...
134 views

### Keep gravity velocity the same all the time

I have 2D rigidbodies that fall to the ground, however they speed up while falling. Also, when they freeze in the air and then unfreeze, the velocity is set to 0 and they gradually start speeding up ...
87 views

### Should I compute impact damage with energy or momentum?

My game uses physics (Box2D in particular). Just about every object in the game can be destroyed, and the primary method of combat is by slamming objects into one another at high speed. It makes ...
505 views

### Player controller script rigidbody velocity?

I don't understand how this works. How does this code go about manipulating the player's rigidbody velocity? Can you explain it piece by piece? //Movement public float speed; public float jump; float ...
41 views

### Very less vertical transformation

Im using pretty basic code here charcter.transform.Translate(Vector2.up * speed * Time.deltaTime); Im using rigidbody 2d and I'm creating a platformer. When i press the button the character ...
51 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 ...
127 views

### An Object is moving but its velocity is 0

In Unity 5 I have an object move when I press a button, force is added as seen by the code below. Then once this force is added I print out its velocity. The problem is that in the console my first ...
165 views

### Getting the Volume of an Uneven Mesh

Let's say I have a cube, and that cube breaks apart into 100 different unevenly sized pieces. How can I get the volume of each of those pieces compared to the cube's volume? Using this in order to ...
202 views

### Colliders for moving inside a spaceship when the whole spaceship is made of a single mesh (in Unity)

I've begun to study a unity engine in one purpose: I have a great multi player game idea! The main essence: In space there are two (or even more) huge spaceships with crew consisted of players (all ...
218 views

### Increasing friction or Adding force relative to transform position in Unity 2D?

Back again with a quick question! I have a few basic platforming mechanics going on in this scene. I have a prefab platform with an animation that loops back and forth between two different x ...
1k views

### How to freeze rotation with a Rigidbody 2D? [closed]

So I am looking to freeze rotation in the Y axis on a Rigidbody 2D. I'm not sure how to set this in my code. This is what I have so far, can you point out my errors? public class PlayerMovement : ...
66 views

### Unity gravity not effecting everyone like it should

so My problem is a bit weird. I have a model that will not fall at the correct speed. She falls incredibly slowly. This is the only script attached to her, and I did the "Scale to large" test by ...
45 views

### Bullet Physic: Stack transformations on body after adding

How can I stack multiple transformations on a body? I mean... Rotate, translate and then rotate again? If I understood, a transformation on a rigid body can be made like this: btTransform ...
47 views

### Question about designing and controlling a forklift's forks

I am building a forklift for a game that I am working and I am trying to come up with a valid way of designing it. So far I haven't really liked the way it behaves in game The forklift has three parts ...
48 views

### unity Rigidbody jump

I absolutely don't know what is the problem with this code and I have tried everything without any success. I need help. void FixedUpdate() { if (Physics.Raycast(transform.localPosition+new Vector3(...
158 views

### Rigidbody physics concept: Why translate collision shape on-the-fly instead of mutating it?

Crossposting at http://stackoverflow.com/questions/29993547/rigidbody-physics-concept-why-translate-collision-shape-on-the-fly-instead-of-m I've spent some time going through physics engine's ...
171 views

### Unity Rigidbody click to move issue

I'm wanting to have a script that when I click in my scene, my player will rotate and have a force added to it and will travel until it has reached the clicked point in my scene. Right now I have it ...
87 views

### unity3d - Object keeps falling down

I have an object that moves towards another object using this line : transform.position = Vector3.MoveTowards(transform.position, target.transform.position, speed * Time.deltaTime); this is it's ...
256 views

### Physics: calculating angular acceleration in world vs local space

I have a pretty simple rigid body simulation written in Python. In my code I calculate the angular acceleration using formula: angAcc = torque * inertiaTensor^-1 (note row-major matrix order) Now, ...
179 views

### Rigging Skinning of human skeleton skin mesh scanned by MRI

I have successfully developed a system in Qt/C++ for human musculoskeletal mocap simulations. I can run asf, amc, bvh motion capture files and can visualize the joint transformations. I even simulated ...
73 views

### unity2D Top-Dow Mobile rigibody2D

im using this code for my 2D TopDown mobile player movement.but when i move player With UI Image buttons player keep moving.it didnt stop.and also player starting of move he is very slow. the he ...
519 views

### OnCollisionEnter2D incorrect contact point?

I am trying to shoot a bullet (rigidbody2d, boxcollider2d) to another enemy object (rigidbody2d, kinematic, circlecollider2d). I want the collision point between these two. When they collide, i want a ...
6k views

### Difference between Update method and FixedUpdate in Unity?

i am starting to learn Unity3d and one of the confusion i get is difference between Update() and FixedUpdate(). I am following Lynda Unity 2D game development tutorial there, the instructor uses ...
95 views

### Lots of bouncing balls sink into each other [closed]

I'm trying to model a system that simulates an arbitrary number of bouncing balls with some gravity. So far I've come up with a solution that can be seen here: https://github.com/ahahalol/...
70 views

### How could I get composite rigid body into unity

I am developing a game, in unity, that has accurate destruction physics and from my understanding unity uses plain old rigid body physics. I was wondering if there was a way to bring composite rigid ...
469 views

### Jumping higher when the player touches a trigger collider in Unity

Im using Unity engine to create a 2D platformer. My character can single/double jump, this works fine everywhere except when i am in range of a collider with a IsTrigger set to TRUE, then my character ...
95 views

### Understanding HingeConstraint in jBullet

I'm using the java port of BulletPhysics engine jBullet. I'd like to make a joints between 2 triangles so that one edge of the first and one edge of the seconds act like a hinge. But I don't ...
33 views

### Applying angular velocity distorts model

I am calculating the orientation of a sphere through the following code wV = new Vector3(0, pi/2, 0); w = new Quaternion(wV, 0); // o is the current Orientation o.Normalize(); w = 0.5f * w * o; // dt ...
530 views

### Can't go above max speed with RigidBody2D.AddForce()

I'm having trouble making a character move faster than a certain limit using RigidBody2D.AddForce(). My game is a top-down 2D game (constrained to the x/y plane). I'm using a float 'MovementSpeed' to ...
117 views

### Warp GameObject Size When Entering/Leaving Area

Below I have an image describing the desired functionality I am going for. Let's say you control a square and when you move this square into a given area, any part of your rigidbody/model inside of ...
245 views

### How can I ensure character weapon is also included in collision detection?

I have two models, my player character and her weapon. Each can be controlled independently (that is, I allow the player to aim the weapon). The object hierarchy is: Character (with ...
169 views

### How can I trigger an event each time the rotation of my rigidbody2D is at a given value?

I would like to trigger an event each time my rigidbody2D is at a particular value. The event should only be triggered once for each given value per complete object revolution. Initial attempts at ...
341 views

I am stuck on the code for couple of days but couldn't figure it out. Therefore I turned out to look the answer here but couldn't find any that match the requirement Hope some One might help here is ...
96 views

### Unity Rigidbody2D to act on certain gameobject only

I am creating a 2D game and the player object has a rigidbody2D attached to it. The game works fine until the player collides with a power up. The rigidbody physics get all messed up. So I was ...
61 views

### How can I add an impulse to specific rigid bodies at rest?

Scenario Rocks falling down a rocky slope, with a flat surface at the bottom. When they land on the surface, the rocks move slightly before coming to a rest. GLESDebugDraw shows the bright orange ...
895 views

### Inverse Explosion with Unity2d

I am currently trying to make all other objects push away from the player when the player explodes. It currently works, but it pushes close objects a little and far objects very far. What I want is ...
1k views

### Repelling a rigidbody in the direction an object is rotating

Working in Unity, I have a game object which I rotate each frame, like so: void Update() { transform.Rotate(new Vector3(0, 1, 0) * speed * Time.deltaTime); } However, I'm running into problems ...