game-physics

Modelling clothing in C++ [closed]

三世轮回 提交于 2020-01-12 06:19:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm looking to write a bit of software that will end up drawing a human frame (which can be configured with various parameters), and the plan is to have some sort of clothing placed on the dummy. I've looked at Blender, and OpenGL libraries as well as other rendering and physics engines, I'm not looking for you

Unity Ball Shaking as it moves

≯℡__Kan透↙ 提交于 2020-01-07 02:05:38
问题 I have a ball game object that I am making bounce using explicit physics equations. I tried using unity's physics engine, but It was not exact enough. I am setting the balls position like so: float dTime = Time.time - timeSinceBounce; ballPosition.x -= meterOffset / sensitivity; ballPosition.y = ballInitialPosition.y + GameConstants.Instance.GetBallYVel () * dTime - (float)0.5 * GameConstants.Instance.GetGravity () * dTime * dTime; //Yi+Vy*t-0.5(G)(time^2) ballPosition.z = (-dTime *

Unity Ball Shaking as it moves

為{幸葍}努か 提交于 2020-01-07 02:05:26
问题 I have a ball game object that I am making bounce using explicit physics equations. I tried using unity's physics engine, but It was not exact enough. I am setting the balls position like so: float dTime = Time.time - timeSinceBounce; ballPosition.x -= meterOffset / sensitivity; ballPosition.y = ballInitialPosition.y + GameConstants.Instance.GetBallYVel () * dTime - (float)0.5 * GameConstants.Instance.GetGravity () * dTime * dTime; //Yi+Vy*t-0.5(G)(time^2) ballPosition.z = (-dTime *

Unity Ball Shaking as it moves

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-07 02:05:08
问题 I have a ball game object that I am making bounce using explicit physics equations. I tried using unity's physics engine, but It was not exact enough. I am setting the balls position like so: float dTime = Time.time - timeSinceBounce; ballPosition.x -= meterOffset / sensitivity; ballPosition.y = ballInitialPosition.y + GameConstants.Instance.GetBallYVel () * dTime - (float)0.5 * GameConstants.Instance.GetGravity () * dTime * dTime; //Yi+Vy*t-0.5(G)(time^2) ballPosition.z = (-dTime *

Unity Ball Shaking as it moves

爱⌒轻易说出口 提交于 2020-01-07 02:05:06
问题 I have a ball game object that I am making bounce using explicit physics equations. I tried using unity's physics engine, but It was not exact enough. I am setting the balls position like so: float dTime = Time.time - timeSinceBounce; ballPosition.x -= meterOffset / sensitivity; ballPosition.y = ballInitialPosition.y + GameConstants.Instance.GetBallYVel () * dTime - (float)0.5 * GameConstants.Instance.GetGravity () * dTime * dTime; //Yi+Vy*t-0.5(G)(time^2) ballPosition.z = (-dTime *

How do I convert these Haxe source files to Python?

匆匆过客 提交于 2020-01-06 23:49:47
问题 I am trying to port the Nape physics engine (written in Haxe) to a language not supported by Haxe (Xojo). Now I don't understand Haxe but I am comfortable in Python. I'm trying to convert the mass of .hx files to python source files so I can then translate them to Xojo. I have the Nape .hx source files (from haxelib) and have installed the haxe command line tool. I have tried multiple permutations to try to convert the .hx files to Python files but am having no success. I have tried the

Java Pong ball glides on paddle

无人久伴 提交于 2020-01-06 08:15:42
问题 im making a pong game in java, i've run into a problem. The bug is that when the pong ball intersects with either the AI or player paddles, the ball will sometimes collide multiple times. It basically looks like like the ball is gliding on the paddle. Sometimes, the ball will even get stuck behind the paddle infinitely. Had anyone ever encountered this error or something similar? I am confused with this multiple collision stuff :( my ball class is below: package ponggame; import java.awt.*;

Frame-rate independent pushForce?

狂风中的少年 提交于 2020-01-06 06:18:05
问题 I'm working with a CharacterController and added the ability to push Rigidbodies. The problem is however that the pushing is frame-rate dependent. How would I be able to make it frame-rate independent? I have tried adding Time.deltatime, but this makes pushing not possible, I might be adding it wrong though. Here's the code that adds force to rigidbodies; void OnControllerColliderHit(ControllerColliderHit hit) { Rigidbody body = hit.collider.attachedRigidbody; if (body == null || body

AS3 - Finding the highest y-coordinate for a given x-coordinate in BitmapData?

和自甴很熟 提交于 2020-01-06 02:59:07
问题 I'm making a platformer. Here is what I have so far: http://megaswf.com/s/2486396 (move around and jump with arrowkeys). I'm using the ground's bitmap data to test collisions with the player's coordinates, and the player is sinking into the ground a few pixels (especially when walking uphill). To prevent this, I want the player's y coordinate to instantly change so that the player is sitting on top of the ground. Here is what I'm working on: if (groundClipBmpData.hitTest(rLoc, 255, bLocFuture

Putting two backgrounds one after the other in objective-c iphone game?

此生再无相见时 提交于 2020-01-04 10:58:13
问题 Hi I am creating an iphone game in my game layer, I have two identical background images but I want them to go one after the other. Once the game animal (eg a penguin) crosses the first background, I want the first background to go after the second one-- becoming a continuous background until the game is over. I have tried everything--- for loops, while loops and such but nothing seems to work Does anyone have an idea for how I could go about doing this? Thank you for any help you can provide