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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
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 ...
user avatar
0 votes
1 answer
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, ...
user avatar
1 vote
1 answer
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 ...
user avatar
12 votes
2 answers
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, ...
user avatar
  • 155
0 votes
1 answer
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 ...
user avatar
  • 11
0 votes
0 answers
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....
user avatar
0 votes
0 answers
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) ...
user avatar
  • 217
0 votes
0 answers
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 ...
user avatar
  • 133
-1 votes
1 answer
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 ...
user avatar
0 votes
2 answers
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 ...
user avatar
  • 3
0 votes
0 answers
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 ...
user avatar
1 vote
0 answers
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 ...
user avatar
  • 111
0 votes
0 answers
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 ...
user avatar
  • 45
0 votes
1 answer
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 ...
user avatar
  • 1
0 votes
0 answers
67 views

Plot rigidbody path simulating magnus effect

I am trying to create a method that will plot the path a rigidbody will take when simulating a magnus type effect with no gravity in Unity. I realize this approach is a drastic simplification to the ...
user avatar

15 30 50 per page
1
2 3 4 5
150