Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

# Questions tagged [physics]

Relating to the motion of objects through space and time. Including concepts such as acceleration (thrust and gravity), mass, collision response, friction and more.

2,236 questions
Filter by
Sorted by
Tagged with
16 views

### Collision not being detected on CharacterController in Unity

Help! For whatever reason, I was following a tutorial on Unity movement, and when I was going to test out collision for certain objectives in my game, for whatever reason collision is not being ...
19 views

### 2D circle and rotated square collision detection and response

I'm creating a 2D multiplayer game in javascript, but I'm actually struggling with a problem (not really a problem, but I don't know how to do). My player have a circle hitbox, so 2 circle collision, ...
1 vote
54 views

### Why do physic engines apply force fully linear, despite adding torque

I checked how the applyForce function on rigid bodies in 3 different physic engines work (cannon.js, matter.js, PhysicsJS) and it seems that this is the common way ...
2k views

### Moving player inside of moving spaceship?

INTRO: I am trying to achieve a spaceship that flies through space and the pilot can get out of their seat and walk around the ship and place physics objects in it while the ship is moving, rotating, ...
• 155
41 views

### Predicting Inclines and Declines for projectiles

For background, I am working on a top-down fighting game. I'm trying to create an archer class, in which the arrow sort of predicts the inclines/declines (moving it about the Y-axis [or up/down]). A ...
• 11
17 views

### line renderer collision detection in 3D

I've been using the code down below to simulate a rope physics (based on this: Create Rope Bridge, String in Unity - Verlet Integration Part 2). Currently, it uses edge collider 2d to detect collision....
• 69
30 views

### How to move an enemy to sneak up on the player from behind, using forces?

I have this code to move the enemy: (for x, same for y) ...
• 217
22 views

### Best approach to model slipstream?

I am looking for a way to model slipstream effect in videogames. The two use cases I want to look at are a simple racing game and the simulation of a peleton (a big group of road bike riders), both in ...
• 133
28 views

### The vector aiming to enemy is in wrong direction

In a 2d game, I am trying to shoot at a moving enemy and the vehicle that is shooting is also moving. However, the velocity of the bullet is not in the same direction as the position of the enemy. The ...
57 views

### How to connect rockets to a space capsule?

I am trying to create a space capsule that has four rockets to balance the capsule. The rockets and capsule haveRigidbody2D and ...
• 3
10 views

### aiming prediction in 2d game using projectile [duplicate]

I am trying to make an agent predict the velocity required to throw a ball at a target and take into consideration the target. So what I need is a ball following a projectile path until it hit the ...
1 vote
60 views

### Aircraft simulation

Trying to get a "semi" realistic aircraft simulator. I'm pulling my hair out because I just can't get the math right. I'm not looking for super realistic but want to at least get some ...
• 111
21 views

### I have a "Floating Capsule Collider" setup, but if Collider stands on the edge of a platform, the player Mesh ends up looking 'stuck'

I have a "Floating Capsule Collider" setup, but it has an issue when the Collider stands on the very edge of a platform-- the player Mesh ends up looking 'stuck' inside of the platform. How ...
• 45
17 views

### How would I calculate the velocity of a sphere with an impulse applied at the top?

I'm developing a rigid body physics engine and currently have accurately calculated the angular velocity of the sphere when impulsed. Unfortunately though, I'm not calculating the velocity correctly ...
• 1