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.

349 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
3answers
4k views

Preventing a Combination of Rigidbody Jump Force & Bounce Magnitude in Unity3D

I'm building a fairly simple marble racing game in Unity3D. The ball is a 3D physics object that moves only on the X and Y axes. It has the ability to roll left and right, and to jump. Pretty basic ...
7
votes
0answers
803 views

How to create skeletal animation data for a skirt?

Please think of this in an engine-agnostic way first, and then we can talk about specific engines. In my game, I have a 3D character which is wearing a hakama (think of it as a long pleated skirt). ...
6
votes
2answers
7k 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) ...
6
votes
0answers
654 views

Implementing proportional navigation in 3D

Good afternoon guys, a = N * λ' * V is the formula for the commanded acceleration required to hit the target, where N is the proportionality constant, λ' is the change in line of sight and V is ...
5
votes
4answers
1k views

Lunar Lander calculating gravity, acceleration and collision in GameMaker

I've already asked this on the GameMaker forums but had no response so far. I'm making a little Lunar Lander game as my first foray in to GameMaker, I'm wanting to have the ship land and take off ...
5
votes
0answers
161 views

How can I create a set of collision points for an arbitrary mesh?

In my project I am working on automatically deforming an arbitrary mesh with respect to another arbitrary mesh, within the context of user generated content, similar to this deformer being developed ...
4
votes
0answers
441 views

3D Physics Engine Collision Response: Solving Simultaneous Collisions via equation

I have been implementing a basic physics engine for a small game project I'm working on. It has very specific requirements, so I decided to try and write my own physics engine to meet them. I found ...
4
votes
0answers
273 views

Rotation of a ball moving on a surface

I have a ball that moves along a platform. The ball is characterized as a sphere that has a radius and a position. The platform basically is a rectangle consisting of two vertex triangles. Its class ...
4
votes
0answers
196 views

Sizing a Box2D ground object

I am developing a platformer game using SDL2 for graphics and Box2D for physics. I am currently designing my levels and would like to know if it is better to make the static part of each level (ie: ...
4
votes
1answer
1k views

Disc Golf Physics in Unity

I am trying to make a frisbee golf game, and I am stuck on the physics of the frisbee. I can get the disc to fly, but I have not been able to add spin or make it act the way a frisbee would in real ...
4
votes
1answer
2k views

How to code a non-newtonian spaceship control script?

I'm working on a simple 3D space combat game, and I've decided to go with simplified physics over proper newtonian motion, similar to the space sim Oolite, and more 'arcade' style games. I basically ...
4
votes
1answer
117 views

How can I determine “exact moment” of collision with ray casting?

I'm currently brainstorming how the physics for my game engine is going to be handled. It's top down and I'm thinking of using ray casting for collision detection. I've reached two potential problems (...
3
votes
2answers
76 views

Interpolation on Rigidbody2D not working

I'm trying to achieve smooth movement for a ball. I seem to be failing to achieve this and now I've created a sample scene, which shows my setup from the game and the problem exists in that sample ...
3
votes
2answers
474 views

What is transmitted over the network during multiplayer first person shooter games?

In games like Half-Life 2, Team Fortress 2 etc, when you play against other players online, your local game communicates with a game server. If you've built one of these games, what sort of ...
3
votes
1answer
315 views

How do I get an object to rotate in world space via RigidBody.AddTorque?

I'm getting really discouraged because I can't seem to figure how how to rotate my object via Rigidbody.AddTorque like it is on a figurative global turn table rather than a local turn table. Another ...
3
votes
0answers
84 views

Faster convergence in a physics engine

I've got my hands on the first edition of the book Game Physics Engine Development: How to Build a Robust Commercial-Grade Physics Engine for your Game by Ian Millington. Because I didn't really know ...
3
votes
0answers
51 views

Force propagation through physic bodies constraints (as non-penetration)

First, some context I'm currently implementing a (well, tiny) game engine using a predictive approach. The idea is to compute when a state change will occur, and only update state at time of the ...
3
votes
2answers
109 views

With gravity enabled, how do you move a RigidBody forwards at a specific speed?

I have a perfectly smooth cube on top of a perfectly smooth plane. I am applying a forward-force of 1 unit per second, using ...
3
votes
0answers
88 views

How to implement path-finding with a large number of blocking agents following similar paths?

I want to implement a demo like creeps laning in Dota 2. So for simplicity, there is Left team and Right team, they are enemies. Units from Left team move toward Right base, and units from Right team ...
3
votes
0answers
159 views

How to properly write “stick to surface” character logic that handles unexpected large time deltas?

I've been trying to wrap my head around this issue: in a 2D platformer game (but this may as well apply to 3D games) I want the character to "stick" to the surface that it's moving along and at the ...
3
votes
0answers
408 views

2D platformer:How to avoid “bouncing descend” when walking down slopes?

I've been working on implementing slope collision by SAT(Separating Axis Theorem). And then I have a trouble. When my character walks down slope, it moves like a bouncing ball: The slope has 3 ...
3
votes
0answers
396 views

Add Rigidbody and MeshCollider at runtime : is it a bad practice?

Good day. To simulate an explosion of a vheicle, I decided to do this: When I need to explode veichle , at runtime, i add rigidibody for every single part of veichle (5-10 part: door, wheel, hood ...
3
votes
1answer
293 views

C# XNA colliders, physics, inclined plane/terrain/colliders

Currently I'm working on a project to learn game programming. But I'm not sure if I have the right approach on several things, and that's what I'm here for. What I'm trying to create is a small world ...
3
votes
0answers
103 views

Soft-restart tampers with physics determinism, resulting in different results

Updated question I have a Spawner entity that spawns my Rollables: ...
3
votes
0answers
243 views

UNET Performance of (many) Kinematic Rigidbodies

I am building a game in Unity in C# using the UNET networking elements. I am trying to figure out what is the performance cost of kinematic rigidbodies? My understanding is that, when kinematic, ...
3
votes
0answers
63 views

Solving constraints/joints in 1D

For n points moving in 1 dimension. Position and velocity are known for each point. Each frame a basic integration is done for each point: ...
3
votes
1answer
814 views

Friction due to gravity in an impulse based physics engine

In my physics engine, I'm using impulses to solve collisions. I'm basing all calculations on these equations: ...
2
votes
0answers
25 views

How can I make my table move more realistically after a collision?

Using Unity 2020. I have a character using CharacterController and Rigidbody, colliding into the end of a long table. My table has, as a root object, the mesh and the Rigidbody. It also has, as child ...
2
votes
1answer
120 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 ...
2
votes
2answers
89 views

How to predict where the soccer ball should be intercepted by an AI player after being kicked?

This question has been asked many times before, but most of the answers give solution to the problem where ball (target) is assumed to be moving at a constant velocity. In my scenario, I'm making a ...
2
votes
0answers
63 views

How to achieve variable jump height in an elegant and natural way

I am making a platformer, with a methodical approach to player physics. This is how I do variable jump height: ...
2
votes
0answers
53 views

Avoid shaking artifacts in 3D continuous collision detection

I am programming a 3D game physics engine that uses continuous collision detection to avoid my objects from being able to "tunnel" through the geometry. Here is basically how it works: Execute a ...
2
votes
0answers
446 views

Simulating Water by changing Y values of Quad Vertices

hopefully this isn't too difficult to answer, but I'm stuck and could at least use some input. I'm working on simulating water for the first time with basic wave functionality. As in I click at a ...
2
votes
0answers
261 views

Bullet Physics Scaling rotational part of 6DoF Spring Damper

I am currently trying to scale up my setup (consisting of two rigid bodies connected by a btGeneric6DofSpring2Constraint) to fall within the suggested dimensions for a concise simulation. In order to ...
2
votes
0answers
466 views

Unity applying forces using animation

I'm trying to make a croquet mallet swing to hit the ball using an animation that rotates the mallet mesh. The mesh appears correctly positioned to hit the ball in the center but the ball doesn't go ...
2
votes
0answers
573 views

Calculate Orbit Path/Ellipse given mass, velocity, and distance (2body)

Calculate and draw the path of an orbit in a 2 body problem given the mass, current velocity, and distance of both bodies? We're working in Unity and will be using the default rigidbody.mass to start ...
2
votes
0answers
836 views

2D Distance Field as collision handler method

Pixeljunk Shooter has really cool fluid simulation. I found the dev's video explaining what they did. Here I understand that it is particle based simulation Smoothed Particle Hydrodynamic I can ...
2
votes
0answers
237 views

Storing rigid body collision shapes in local or world coordinates

I'm writing the beginnings of a lightweight 2d rigid body engine (in javascript, as a hobby project), and i'm debating whether to store collision shapes in local or in (updated as needed) world ...
2
votes
0answers
156 views

How to aim with a spaceship in 3D considering its angular momentum?

So I have a spaceship and I have 6 degrees of freedom. At a given moment the following vectors are known of the spaceship: Local forward. Local up. Local sideways (may be implied from the previous ...
2
votes
0answers
275 views

How do I compute the angle between a pixel on an irregular curve and a circle colliding with it?

I'm building a custom physics engine to accompany a level-editor. This image shows how the level-editor outputs levels: Now, some explanation is in order. The curve is defined by the red points. ...
2
votes
0answers
179 views

Newton Game Dynamics: Making an object not affect another object

I'm going to be using Newton in my networked action game with Mogre. There will be two "types" of physics object: global and local. Global objects will be kept in sync for everybody; these include ...
2
votes
3answers
378 views

How can I make the player slide when he does a 180 degree turn?

I'm making a roller skating game and I would like to player to skid or stop moving skating when they try to move in the opposite direction of their current one. But I'm not sure how to go about this. ...
2
votes
1answer
875 views

finding the angle to launch a projectile at a 3d coordinates

I have a game where the user can shoot a bullet and the bullet flies through 3 dimensional space and eventually hits the ground somewhere. My question is how can I calculate the ...
1
vote
0answers
20 views

How to make a catapult work with physics and colliders?

This should be my final question regarding getting a catapult to throw something in unity. On my last question, someone suggested starting with something simpler (which I apologize for not doing ...
1
vote
0answers
40 views

How can I calculate the inertia tensor of a hollow object defined by a triangle mesh?

I want to calculate the mass, center of mass, and inertia tensor of player created objects. Some of the objects will be hollow instead of solid. I am creating a closed triangle mesh for their object. ...
1
vote
0answers
30 views

What is closing and separating velocity in Ian Millington's game physics book?

I'm working on a physics engine in C++ and chose Ian Millington's Physics Engine Development book as a guide and reference to help me out understand physics concepts and how to implement them. ...
1
vote
0answers
46 views

Skeleton bone in incorrect spot in-game yet, blender rig, skeleton mesh and physics asset are all correct and behave properly

I've made a custom character and rigged it in blender. Then exported/imported into ue4. It behaves properly in the PHAT and the skeleton mesh looks fine and it all behaves properly in the simulations. ...
1
vote
0answers
33 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 ...
1
vote
0answers
45 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 ...
1
vote
0answers
26 views

Getting “continuous collision detection”-like behaviour out of triggers

I have a particular scenario where I want to use a trigger to adjust the course of a fast-moving projectile, but am running into issues because Unity does not support continuous collision detection ...

1
2 3 4 5
7