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
0answers
23 views

Make objects stack in unity?

I have two kinematic rigidbody cubes from the standard 3D objects, I have also enabled contact pairs mode to "all contact pairs", how do I make it so that no matter what angle they collide ...
-1
votes
0answers
32 views

Adding frame-rate independence to more complicated 2d game physics

Currently, I am having the problem of converting the physics engine on my 2D game to work frame-rate independent. I have looked at a lot of other questions, but I haven't been able to make any of the ...
0
votes
1answer
29 views

2d gravity simulator - smaller object orbiting towards center of bigger object

In my libgdx test game, I have initially created 2 circle objects (stellar) about which I will say more in details below. However, my goal is to simulate gravity in 2d, where smaller object orbits ...
0
votes
1answer
37 views

Character Controller and Reverse Gravity

So I have a Game object with Rigid Body, a Character controller and my Movement script. On a specific condition I am reversing gravity. The problem is that the velocity.Y when the gravity is reversed, ...
1
vote
0answers
15 views

Large values for Rigidbody Velocity (UNITY3D)

I'm making a simple FPS game. I've come across this problem that I am unable to solve for quite some time. If this is question has already been asked before then do let me know. The problem at hand is ...
0
votes
0answers
22 views

Performance cost of using character collider?

I am attempting to get an update to this question: https://answers.unity.com/questions/57680/should-a-character-controller-attach-with-rigidbod.html There are conflicting answers. From my ...
0
votes
1answer
29 views

Change rigidbodys default height from floor?

I am new to unity and I have a few questions: There is a mesh that has a rigidbody and a box collider that I placed on the scene. I also added a generic terrain to the scene from the 3D objects menu. ...
0
votes
1answer
56 views

How do I get my sprite to do a regular jump instead of jolt up?

I have been getting into game development and I have made some progress. I have come across an obstacle which is jumping I managed to get the Jumping to semi work but it doesn't look like a jump but ...
0
votes
0answers
15 views

Uncover Physics Object to Pick it Up

I want to be able to have physics objects semi-buried in leaves, dirt, or whatever and be able to have the player click on the area a couple times to uncover them, and he can't pick it up until he has ...
0
votes
0answers
10 views

Correct way to compute separation velocity from impact velocity, normal, friction and resitution?

I am creating a simulation of rigid bodies in 2D space. My collision detection returns: normal - The normal vector of the collision (e.g. ...
2
votes
1answer
123 views

Simplified aerodynamics for 3D airplane

I'm looking how to implement simple movement for an airplane in 3D in godot, i couldn't find any tutorial or any hints on how to do this, mostly theoric information on a more real flight movement. Any ...
0
votes
0answers
23 views

How to “relax” robotic arm?

I have downloaded robotic demo from here. It contains robotic arm, which I can move by keyboard While moving, parts of arm oscillating naturally, which proves that physics is applied to them. How can ...
0
votes
0answers
13 views

Fixing rootmotion by calculating a lerp force

I have a json full of rotation and forward + right force for rootmotion. The problem is the end position in the animations don't end on a straight line. You can see where I end up and what my desired ...
0
votes
0answers
50 views

Aircraft trajectory prediction

I have an aircraft that is controlled by player and i need to predict it's position at needed time. It's not a problem if the plane is just moving straight but most of the time aircraft is maneuring. ...
0
votes
1answer
29 views

OBB vs rectangle/quad/plane with bounds collision detection/response

I am able to resolve collision between an OBB and a plane but can't get it to work when I introduce some bounds on the plane size. I want to have the plane of width ...
2
votes
0answers
40 views

How to make a moving platform in Godot not be affected by collisions?

I am trying to make a moving platform in Godot (for a 2D platform game, but I suspect the issue would be similar in 3D). Basically, both my player and my platform are KinematicBody2D, and they move ...
1
vote
0answers
34 views

What in the BOTW game engine makes physics behave wildly when certain actions are triggered during bullet-time? [closed]

What in the BOTW game engine makes physics behave wildly when certain actions are triggered during bullet-time? https://www.youtube.com/watch?v=dXKsTrwZ6XY Also, what can you do to prevent it? Is this ...
0
votes
0answers
19 views

Fixed physics time step and input lag

Everywhere I read says I should fix the time step of my physics simulation, and interpolate the result to the actual frame rate of my graphics. This helps with simplicity, networking, reproducibility, ...
0
votes
1answer
24 views

OnTriggerEnter error: The message parameter has to be of type: Collider

I have a crate and I want to make it so if you are in the trigger of the crate a UI appears and says "Click E to loot". I have the UI setup but the script is not working. Here is my script ...
0
votes
0answers
19 views

Preventing player units from pushing enemies, and vice versa

I am using a Rigidbody2D to handle collision between different units. When the player's units encounter one another, they push each other because of the rigid body physics (and that's good for me). ...
0
votes
1answer
55 views

2D/3D Soft body physics in Unity

I want to implement soft bodies in my game similar to this link. I tried using this Soft body simulation plugin but it has the following problems: Only works with box colliders. Doesn’t work with ...
0
votes
1answer
13 views

How to mitigate when applying horizontal force to a rigidbody seems to overpower gravity?

I've started testing movement using the example code in this answer of making a body accelerate to a target velocity ...
0
votes
0answers
20 views

Coding Spelunky Edge Roll Mechanic

Inspired by the recently released Spelunky 2, I've been making Spelunky clone from scratch using Monogame for gamedev coding practice. I've successfully coded the basic platforming mechanics: terrain ...
0
votes
1answer
44 views

What are the dangers of setting rigidbody velocity directly for movement and what are the alternatives

I'm playing around with Unity, trying to make a neat 3rd person platformer movement system using rigidbodies so that I may in the future implement things like pushing boxes/physics objects, grappling ...
1
vote
1answer
46 views

How do I calculate to and from a Non-Linear Acceleration?

I am looking at non-linear accelerations using the following values: initial_acceleration time_to_max_velocity max_velocity current_velocity Initial_acceleration is the per frame acceleration we ...
0
votes
0answers
11 views

Unity prevent force apply on re-enable Physics2D.IgnoreCollision

I'm making 2d platformer game. My player and enemies are rb with body type Dynamic. I choose dynamic for enemies because enemy need physics ( jumping, colliding ...
0
votes
0answers
33 views

How to create soft tires like in `Spintires`?

Here is an screenshot of a deformed tire in the game Spintires. I would like to achieve a similar effect in my game I'm using Bullet as the physics library, if that matters.
0
votes
2answers
74 views

Smooth out movement of the snake in a 2d Snake game

I am working on a 2-D snake game in C++ with the SFML library. I would like to smooth out the movement of my snake as it looks extremely choppy currently. How the Snake moves The snake is made up of a ...
0
votes
0answers
25 views

How can I add directional friction like asteroids with SPEED and DIRECTION?

I'm trying to make asteroids, and right now I'm setting the direction based on the mouse angle, like so: ...
0
votes
0answers
39 views

Calculate whether you can jump from one platform to another

I need some kind of formula that will help me connect two platforms that are reachable to each other by jump. I am working on a pathfinding implementation for a 2D platformer and preprocessing the map ...
0
votes
1answer
38 views

Implementing a Turn Radius for a Character

I'm working on a 3rd person platformer in Unity where I'm attempting to capture a Mario 64 style feel. Part of the game involves attaining really fast speeds. Currently, my turning code is pretty ...
0
votes
0answers
27 views

How to move an object faster through an arc - Unity

I'm shooting a ball in an arc, but currently it takes too long to move through the arc, so when I increase the force, it doesn't make the ball move faster through the arc, it just launches the ball ...
1
vote
0answers
38 views

Proper sphere collision resolution?

I am implementing a sphere to sphere collision resolution and I am a little confused on where to start. First question, is there a standard way that games/engines do sphere to sphere collision ...
0
votes
2answers
82 views

How can I stop the ball from bouncing forever without changing the gravity?

I am using Monogame in Visual Studio 2019 and I need to find a method to make the ball that I fired with the cannon stop after bouncing from the ground, and while doing this, I have to not change the ...
0
votes
0answers
20 views

Simple Car Animation Acceleration Too Slow

I am trying to make a very simple car animation where using the arrow keys, I can make a car move around. I am using wheel colliders and some code that goes like this: ...
0
votes
1answer
39 views

Performance problem when multiple enemies are grouped up

I have enemy with simple behavior: Reach the player's current position. In game are increasing waves, which are increasing the number of enemies. But when are more enemies (like 14), and they got too ...
0
votes
1answer
52 views

How to detect which car T-boned the other in a collision?

Setup The game has cars and collisions, and I'm trying to create the following system: When a car T-bones another, the one getting T-boned is destroyed; When the cars collide laterally (usually just ...
2
votes
1answer
76 views

Game physics of tearing apart

For a game I'm programming I'm looking for a kind of realistic mechanic for simulating the tearing apart of objects. Let me explain: I have a given point p in a 2-dimensional space (possible later ...
0
votes
0answers
39 views

Box2d on authoritative server for Unity client

I'm creating a multiplayer platform and shooting game in unity, using unity2d's own physics system (box2d). But the truth is that I am quite lost in the creation of an authoritative server in c ++. I ...
0
votes
0answers
25 views

Upside down ground correction?

How would you go about making ground correction for a platformer but upside down(reversed gravity)? I used this formula: P.Y+=(P.Y-2)%8-1 but the character just ...
0
votes
2answers
44 views

I am getting different results when using 'Maximize on play '?

so i'll be straight to point. when i move my character without using 'max on play' it works fine just as i wanted it to be. but when i switch to 'max on play' my character moves very fast. i am using <...
0
votes
1answer
66 views

Godot: Move_and_slide_with_snap not working on slopes

My Problem I am currently building a platformer game. I was attempting to use move_and_slide_with_snap for the first time and can't find it working for me. My character does snap to the ground like I ...
0
votes
0answers
25 views

Calculating radius during collision

This picture is from one of Dirk Gregorius' presentations: The original diagram has only one contact point (the red one). The r_1 and r_2 vectors are required to produce rotation while solving the ...
0
votes
2answers
82 views

Jittery collisions in Unity 2D

I tried to implement a simple movement to my object. My object moves perfectly fine but I'm having issues with its collision. When I keep on moving object towards the obstacle/ground, collision are ...
0
votes
0answers
20 views

Algorithm for simulating collision between circles of different mass

First of all, I'm not sure if this is the right site for this question, as it's actually a game I'm developing. However, I thought that this would be a common thing to need to know in games, so I put ...
0
votes
0answers
16 views

Contact points in collision

I am making a GJK-EPA based collision detection routine. In this picture, the algorithm picks up on two contact points (the endpoints of the green penetration vector). I'm certain that the penetration ...
0
votes
0answers
14 views

Spider physics to patrol on platform smoothly when changing direction

I have a 3 tile wide platform. I want my spider to hang from the ceiling and patrol this platform left and right. I have dx property for velocity. I want a physics code that shows how to achieve this. ...
0
votes
0answers
33 views

What are the parameters for a smooth wall jump

I want to make a platformer like Celeste and trying to implement wall jump. When the player is on the air and near a wall, and presses jump, the player gains x velocity opposite the wall direction, ...
0
votes
0answers
18 views

What is the correct formula for penalty forces?

I am trying to add penalty forces between two hard body objects, so when they collide they move in a realistic way. What I have so far is this: ...
0
votes
0answers
8 views

Help with Ragdoll snapping back to origin

So I have a ragdoll system that is enabled when the player is hit by an enemy. When the ragdoll is enabled I disable the animator, wait 3 sec, then enable the animator and play a get up animation. ...

1
2 3 4 5
42