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

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

0
votes
1answer
12 views

Trying to mix and mingle 3d physics with the Unity UI

I have recently created a drag drop system where I drag stuff from a UI menu and then drop it to another UI. The child of the draggable UI object is a 3d model. I have attached box collider and ...
1
vote
0answers
23 views

Avoid object from bouncing non-stop after AddForce() is applied to it

I want to implement some sort of elastic field on my light blue magnetic field when a cylinder is colliding it, it worked except the lines won't stop bouncing. I am enabling the trigger collider on ...
0
votes
1answer
33 views

Manipulating time in Unreal messes up Physics simulation?

I'm trying to achive a Super Hot like gameplay, where the time only flows when the player moves. But when I stop time, then restart it, physics simulation will be messed up. Like: Cloths starts ...
0
votes
0answers
19 views

Unity 2D RPG NPC collision and movement

I am prototyping(that is why I'm using squares) a 2D RPG and have implemented some movement & npc dialogue system. All this is done in Unity 2018 and for the purpose of dialogue system I'm using ...
0
votes
1answer
29 views

Unity - OnTriggerEnter & OnTriggerExit strange behavior

I am having a trouble with OnTriggerEnter with a lot of objects. I have a NavMeshAgent moving randomly throught the scene, then I have a sphere collider inside a children to detect nearby objects. If ...
0
votes
1answer
39 views

How to find the resulting angle of a ball hitting a wall in 2D

So there's a ball moving on a 2D plane with any vector. When it comes into contact with a collider, it should reflect in a linear fashion. What formula should be used in order to find the angle that ...
1
vote
1answer
30 views

Can I apply a force to particles from a script?

I'm working on a game which involves streams of electrically-charged particles, being manipulated with electric and magnetic fields. Since I want a large number of small objects coming from an emitter ...
0
votes
2answers
87 views

Is there any way to keep the applied torques in the old planes, even if the ship's local plane has rotated?

I'm trying to make a space shooter game in Unity3D with realistic spaceship physics. I have a problem with correct rotations. When I apply torque in global coords system it will always apply them in ...
3
votes
1answer
159 views

What is the physics behind a 2D gravity tunnel?

In Portal 2, there is a concept of an "excursion funnel", a beam of light that moves physical objects in a certain direction. Here is a link to a demonstration. I added a simple implementation that ...
1
vote
0answers
41 views

Confused about calculation of steering force

I'm reading Programming Game AI by Example, by Mat Buckland. What I don't understand there is why the individual behaviors return a vector representing change in velocity, but the combined result is ...
0
votes
0answers
37 views

3D Bird Flight/Gliding Physics (Simple)

I am trying to create flight/gliding physics for a mobile game in unity. Essentially it needs to be a bird that is simply gliding forward through a path. I am not aiming to replicate bird flight ...
2
votes
1answer
77 views

How to implement swooping movement?

I am trying to code some swooping behavior for a flying enemy in my 2D platformer. The ideal behavior has the enemy starting from an arbitrary height above the ground, then accelerating downward and ...
1
vote
0answers
38 views

Center of Mass for Convex shape in 3D

For an arbitrary convex shape in 3D, how can I calculate its center-of-gravity? I have face-normals, and the vertices for each face. @Ocelot No, it most certainly is not the average of the vertices, ...
0
votes
1answer
27 views

Unity Rigidbody sitting on top of another Rigidbody does not move with the Rigidbody its sitting on

I have a mesh with a rigid body that moves back and forth like a platform. Other rigidbodies fall onto the upper surface of this cube. The problem I have is that when the platform rigid body moves the ...
0
votes
0answers
16 views

Prediction and BEPU physics

i am doing a multi player game with bepu physics hosted on server. Client use client prediction to move player. Client will send a message( contains: pressed time T, sequence number N ) to server ...
0
votes
1answer
41 views

How to manage collision between balls in Game Maker 2 (Drag and Drop)

Hey there I'm using Game Maker 2 Drag and Drop for a project, I made a game like Break Out and when the ball collides with the wall it doesn't bounce, in Game Maker Studio we had Bounce Action but in ...
0
votes
0answers
27 views

How does Cortex Command handle its pixel based physics?

I would assume that it's a cellular automaton similar to "powder" games but I can't find any resources on its development or physics engine. I'm not very familiar with cellular automata, and I might ...
0
votes
1answer
32 views

How to collapse a structure after procedural destruction

When considering this temple structure with procedural damage in pink: How can I efficiently determine the collapse of such structure as below? Even if the model is defined on a voxel grid, it would ...
0
votes
1answer
37 views

UE4 Get direction of Ball rolling and boost it

I'm sitting on some kind of a Minigolf-Game in my freetime. There is a PowerUp collectable which should give the ball a boost. I tried it with SetPhysicsLinearVelocity and also with AddForce. ...
1
vote
0answers
18 views

How to determine angle of incidence, resulting position, and resulting velocity for a point with position and velocity appearing within a rectangle?

I have a rectangle positioned on a 2D Cartesian coordinate system, and its minimum x and minimum y are represented as a coordinate pair (xrect, ...
0
votes
0answers
16 views

How do I make a 2d flying character (an airplane) that flies in the direction of the nose and can be tilted to change directions?

So I'm completly new to game development on Unity, yet Id like to make a simple game. The main focus is flying, but I'm having a hard time figuring out, how to make the plane move in the direction its ...
0
votes
0answers
9 views

How do I rotate the child object of a rigidbody? [duplicate]

Suppose I have a game object with Rigidbody component attached. I then create a child object below it. parent->child How do I rotate this child object relative ...
0
votes
0answers
18 views

Swinging the player using hinge joints

I'm prototyping with a grappling hook mechanic in 3D space. I got one function working fully where, if I left click, the hook travels towards an object, and brings the player to a object tagged to be ...
0
votes
0answers
36 views

Resolving collision physics across distributed physics engines?

How are physics engines linked for sharing workload or working with each other's entities over a network? I'm not really sure if this is common or not done at all. I realize having a single engine ...
0
votes
2answers
29 views

Bullet spread changes depending on the camera direction

I'm working on an FPS game. I want to make a little bit of difference in shooting direction, only on the horizontal axis. To do this, I wrote this code: ...
0
votes
0answers
19 views

How do I instantly stop wheels (WheelCollider) from moving?

I'm using the Unity Standard Assets car on a race track and made it so that if you hit the wall, you respawn. I do this by setting transform.position to the spawnpoint (Vector3) and setting velocity ...
0
votes
2answers
31 views

Hinge joint is not firm, leaving connected anchor position

I have a hook with hinge joint which is working fine but as my object quickly move my hook leave its position for a while. And here is the hinge joint settings with rigidbody: Here is a short clip ...
1
vote
1answer
60 views

Wall collision response results in jittery physics

I have the following game loop : ...
0
votes
0answers
79 views

Swinging the player from a rope (Unity 3D)

I'm prototyping with a grappling hook mechanic in 3D space. I got one function where, if I left click, the hook travels towards an object, and brings the player to a object tagged to be hookable. Now ...
0
votes
1answer
113 views

Make a glass cup look like it's full of water

I've been struggling to figure out a way to make a glass cup full of water, and since the cup is made of glass a plane on the top of the glasse won't really do it, so how can i go around making the ...
0
votes
1answer
47 views

Separating axis theorem OBB vs Sphere

I am trying to implement collision detection in 3D between OBB/AABB and sphere. For this i'm using sat/separating axis theorem. For sat to work in 3D i need face normals of obb (sphere to face), each ...
0
votes
1answer
75 views

What is best for 2D movement: velocity or AddForce?

So I have tried both Velocity and addForce but I'm not getting the result I was expecting which makes me wonder if I fully understand what they do. Move script (test script 1) ...
0
votes
0answers
15 views

Calculating the resulting velocity after a reflection

I am trying to do a simple reflection of a point entity off of an arbitrary surface that contains it. It doesn't have to be physically correct but essentially the goal is to do the following: ...
0
votes
0answers
22 views

Character Controller approaches for a fast quadruped

I'm working with Urho3D at the moment, which uses Bullet for physics, and I'm trying to create a character controller / physics system for my quadruped character. I'm aiming to get this character able ...
1
vote
1answer
55 views

How to synchronize moving hazards?

I am trying to implement a saw blade hazard in my platformer. The saw blade simply moves from point A to point B, and back, at constant velocity. (Let's assume all saw blades move at the same velocity....
2
votes
1answer
48 views

Jumping to land x pixels ahead while not really moving (2D)

The player object in my game has its x-axis locked. It can only jump on Y. It's the ground that constantly moves to the left so that it appears like the player is moving to the right. The ground is ...
0
votes
0answers
18 views

Unity3d ragdoll gravity issue?

I was following AnimFollow tutorial to learn how to rag without using any script from it. I found issue with gravity. When I hit play button and animator is enabled character stay on air and play idle ...
0
votes
1answer
65 views

2D Sidescroller Gravity

Ive looked up implementing gravity on several sites. Subtract a constant gravity (9.8 * DeltaTime) from the velocity each frame. My problem is, when implementing it as they say, when walking off a ...
0
votes
0answers
30 views

Unity3D Hinge Joint Ropes Unstable

I need to create several ropes to go on the head of a mop, which can be picked up and moved around as a physics object by the player. I've tried composing each thread out of several capsules connected ...
-2
votes
1answer
28 views

Why does my OnTriggerStay method throw a NullPointerException when I access the collider's attachedRigidbody?

I set the trigger void OnTriggerStay(Collider other) { other.attachedRigidbody.AddForce(Vector3.up * 100, ForceMode.Impulse); } But when player walks on, ...
0
votes
1answer
45 views

Unable to rotate a 2D object, wanting to move it like a ball/wheel

I'm using Unity2D. I have a very basic 2D space with a platform, a ball and 2D physics. Physics is being applied and ball sits on top of the platform. However, it will not spin. Below is the ...
1
vote
1answer
44 views

Unity3d Pause RigidBody object, don't stop time

Time.timeScale = 0 obviously works to stop physics but it's also stoping my Invoke calls. How can I get around this to pause ...
6
votes
2answers
209 views

Which fixed framerate should i choose for physics thread?

I am writing first-person shooter game with fast motion. I have a fixed high-frequency physics loop thread, which is separated from variable-frequency rendering thread. I need to choose the physics ...
0
votes
1answer
64 views

Unity 2D: Inconsistent jump height in game window

Whenever I start the unity editor and play it in the Game windows, sometimes the object can jump higher sometimes it is just small jump. I didn't change any value in my script nor changed it in ...
0
votes
1answer
30 views

How to implement level-player collisions resolution?

I want to create simple collision response system (physical simulation is not required now). It is needed just that player can't go through walls. I consider some variants: - Just create a set of ...
0
votes
1answer
33 views

Choosing the correct normal for a collision

I have taken the task of building a basic impulse physics engine. Circle vs Circle collision resolution has been done and I moved onto Line vs Circle. I can detect a collision and know that the normal ...
0
votes
0answers
38 views

Physics update in a client/server architecture with different tick rate

In a game where the client would run at 60FPS and the server 20FPS/possibly 10FPS, I wonder if is possible to update the physics without losing resolution. Consider the circunstance where a character ...
0
votes
1answer
59 views

Projectile Not Correctly Inheriting Parent Velocity (Unity3D)

I am trying to fire projectiles from a player who is moving at very high speeds. The issue is that the bullets do not seem to inherit the angular velocity. If the player is moving in a straight line ...
4
votes
2answers
136 views

Top-down conveyor belt with Box2D

I'm trying to code a conveyor belt for a project made with LibGDX and Box2D and I would like to make it like this one from Bomberman Land Touch. As you can see, the entities standing on it should be ...
0
votes
1answer
61 views

How can I access an OpenGl buffer from within a GLSL 330 shader?

I am currently attempting to create a simulation using OpenGl's GPU acceleration for both the simulation computations and rendering. The rendering portion of my simulation is complete and working, but ...