Skip to content

Instantly share code, notes, and snippets.

@lovehou922
lovehou922 / PhysicsHelper.cs
Created December 2, 2024 11:51 — forked from ditzel/PhysicsHelper.cs
Unity Helper for Physic Functions
using UnityEngine;
namespace Ditzelgames
{
public static class PhysicsHelper
{
public static void ApplyForceToReachVelocity(Rigidbody rigidbody, Vector3 velocity, float force = 1, ForceMode mode = ForceMode.Force)
{
if (force == 0 || velocity.magnitude == 0)
@lovehou922
lovehou922 / DebugConsole.cs
Created April 11, 2023 04:19 — forked from darktable/DebugConsole.cs
Unity3D: Heavily modified version of Jeremy Hollingsworth's DebugConsole script.
#define DEBUG_CONSOLE
#define DEBUG_LEVEL_LOG
#define DEBUG_LEVEL_WARN
#define DEBUG_LEVEL_ERROR
#if (UNITY_EDITOR || DEVELOPMENT_BUILD)
#define DEBUG
#endif
#if (UNITY_IOS || UNITY_ANDROID)