question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Write RigidBody / Physics Unit Tests

See original GitHub issue

Summary

There are already unit tests that check some basic cloning / copying functionality, but there are none that test actual physics and transformation behavior. Add a few basic tests to ensure physics works properly.

Analysis

  • The basic test layout could be to create a scene, make it current and simulate a certain number of frames with a fixed timestep, similar to the sandbox single-frame step.
  • Tests could include:
    • A ball falling down onto a platform.
    • Non-static bodies not depending on parent transform, unless AllowParent was set to true.
    • Probably lots of others, including properties, joints, etc., but keep it short and simple for now.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Barsonaxcommented, Oct 8, 2017

Ah that also explains why I had to use Resharper to actually run the tests. In pathfindax I use the NUnit3TestAdapter nuget package so that you don’t need the extension.

Tested it with the Nunit2 extension and now it works without problems. Still maybe consider adding that nuget package to the test projects? That way ppl won’t have to install the extension.

0reactions
ilexpcommented, Oct 18, 2017

Immediate ToDo

  • Implement a unit test that checks PickShapes for correct functionality in both point-based and rect-based overloads, as well as both local and global overloads.
    • Make sure the failure case from issue #291 is included and reproducable with the pre-#579 code.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unity testing framework with physics interaction
The goal of this article is to give some practical example of testing high level interaction that involves 3D physics (rigid bodies) simulation....
Read more >
Video Game Physics Tutorial - Part I: Rigid Body Dynamics
In this tutorial series on physics in games, we'll explore rigid body physics simulation, starting with simple rigid body motion in this article, ......
Read more >
Rigidbody physics - Manual
Introduction to Rigidbody physics, Overview of the concepts and fundamental behaviours of the Rigidbody class and component. ; Configure Rigidbody colliders, How ...
Read more >
Scripting API: Rigidbody
Control of an object's position through physics simulation. ... SweepTest, Tests if a rigidbody would collide with anything, if it was moved through...
Read more >
Unit testing collision
Hello, As the title implies, I'd like to unit test collision. ... While writing this I found out the "Rigidbody.SweepTest" API.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found