Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
0answers
21 views

Rigid body dynamics : how to check if result is physically correct

I implemented rigid body dynamics according to this guide. And it kind of works. However I'm not entirely sure if the dynamics is correct when angular momentum is not collinear with axis of inertia ...
0
votes
0answers
33 views

Problem about simulating rigid body rotation with bullet physics engine

I want to simulate an object imposed by a torque T={1,1,1} with reference to the world frame. The mass of the object is 1Kg, and its diagonal elements of inertia tensor is {2, 1, 1}. However bullet2.7 ...
0
votes
0answers
27 views

How to move a ball in Unity

I'm making a remastered of a game from 2004 in Unity ("Ballance" Atari), and I was recently working on the ball movement. Here is my current solution: ...
0
votes
1answer
925 views

Proper way to set a RigidBody's maximum velocity

I am trying to gradually accelerate a GameObject with a RigidBody attached until it reaches a maximum velocity, at which point it becomes unable to gain any more velocity. I know I can simply reset ...
1
vote
1answer
812 views

Problem when trying to use rb.MoveRotation in Unity

OK so I learned that rb.MoveRotation is different from rb.transform.Rotate(). But I am having trouble using it and hoping you can help me. I usually use transform.translate(Vector3.forward) (after ...
0
votes
1answer
402 views

Adding physics to a Blueprint actor in UE4

I am trying to create a dice in ue4 and be able to read off what value it gives. I've made a mesh in Blender and created a texture, imported them and created a blueprint actor and added the static ...
0
votes
0answers
19 views

Browser sandbox for object interaction testing

I’m looking for a sandbox where I can upload/import STL or OBJ files (rigid bodies that I can export from a CAD software) for quick interaction testing with gravity and contact. The idea is lowest ...
0
votes
0answers
25 views

Interacting rigidbodies between two physics worlds/instances

I'll be posting my first question here. It's a hard one! But maybe you know a simple solution :) I'm trying to make a multiplayer game using bullet physics. I came to a lot of problems but now there ...
1
vote
1answer
49 views

In Maya- how can I merge mulitple primitive cubes together into one parent item? (And is this actually needed for using in unity etc)?

Im trying to make some 3d models in Maya and then put them into Unity as characters which I can give rigidbody to etc. (Im new to Unity and 3d modelling software, but i have a small amount of ...
0
votes
1answer
71 views

Problem resolving rotation between sphere-sphere collision

I have developed a collision detector that return collision data, as collision normal, collision point, interpenetration, etc. And now I am developing a collision solver. The collision solver compute ...
0
votes
0answers
302 views

Unity - 2d Bounce effect using trigger colliders

I have 5 objects moving from the bottom of the screen to the top. From time to time they collide with each other. They all have Circle colliders 2D (these are set as trigger colliders), Rigidbodies 2D ...
0
votes
1answer
40 views

Interpolate object collision stuck in Unity

I am working on a very basic test in 2D. The problem I am having is that, when my sprite collides with the ground, it is checking the event too frequently. The sprite stays in limbo, as it doesn't ...
1
vote
1answer
87 views

Unity - Moving RigidBody to a point in a spherical world

I have a planet ( a spherical planet) that have units on the surface , that units are attracted by the planet with this ...
0
votes
1answer
431 views

Objects do not stop when colliding each other while using mouse drag

I work on a 2D game and I have multiple objects that the player can control. The objects each have a RigidBody2D and a Collider, and a method OnMouseDrag() with ...
0
votes
2answers
261 views

2D - Need help understanding how to resolve multiple collisions in a simple physics engine

I am trying to create a small game engine in Java using only basic openGL functions and implementing everything else from scratch. I am trying to get a basic physics engine working (similar to box2D ...
0
votes
1answer
105 views

How can I prevent my bullet from influencing other players when colliding with them?

So when my bullet which is a Rigidbody is hitting another player which is also a Rigidbody, the bullet is getting destroyed immediately. But it seems that this isn't enough to prevent the physics to ...
0
votes
2answers
84 views

Raycasting to AddForceAtPosition goes to the wrong direction

I'm trying to get my coin object's Rigidbody to move whichever way it was swiped on by the user through RayCast ...
0
votes
2answers
415 views

Rigid body physics resolution causing never ending bouncing and jittering

I'm trying to make a fairly simple, impulse based rigid body simulator as part of a Uni assignment. I'm using bullet physics to perform collision detection, and my own code to perform collision ...
1
vote
2answers
291 views

How to get the point of collision in Separating Axis Theorem?

I'm interested in the relatively precise point (not line) of collision for calculating angular velocity on impact for use in a impulse calculation. At first I thought, perhaps naively, that I could ...
1
vote
1answer
251 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-...
4
votes
2answers
3k 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) ...
1
vote
2answers
124 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 ...
3
votes
1answer
271 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 ...
1
vote
3answers
805 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 ...
3
votes
1answer
1k 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 ...
0
votes
1answer
180 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 ...
3
votes
2answers
756 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 ...
0
votes
1answer
99 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 ...
1
vote
2answers
714 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 ...
1
vote
1answer
383 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 ...
2
votes
3answers
569 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 ...
2
votes
2answers
396 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 ...
-1
votes
1answer
2k 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? ...
0
votes
1answer
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 ...
0
votes
2answers
178 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 ...
0
votes
1answer
1k 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 ...
3
votes
1answer
892 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 ...
2
votes
3answers
348 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 ...
2
votes
1answer
692 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 ...
1
vote
2answers
3k 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? ...
0
votes
1answer
248 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 ...
-1
votes
1answer
53 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: ...
0
votes
0answers
101 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 ...
0
votes
0answers
74 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. ...
2
votes
1answer
201 views

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

Crossposting at https://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 ...
0
votes
0answers
276 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 ...
1
vote
2answers
442 views

unity3d - Object keeps falling down

I have an object that moves towards another object using this line : ...
7
votes
1answer
516 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, ...
1
vote
0answers
277 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 ...
0
votes
2answers
80 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 ...